changeset 5231:baa7927dfbd2

8022798: "assert(seq > 0) failed: counter overflow" in Kitchensink Summary: Removed incorrect assertion, sequence number can overflow Reviewed-by: dholmes, kamg
author zgu
date Wed, 04 Sep 2013 08:55:08 -0400
parents 35b99e7e0af2
children 38f750491293
files src/share/vm/services/memPtr.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/memPtr.cpp	Sun Sep 01 10:37:01 2013 -0400
+++ b/src/share/vm/services/memPtr.cpp	Wed Sep 04 08:55:08 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,9 +34,9 @@
   jint seq = Atomic::add(1, &_seq_number);
   if (seq < 0) {
     MemTracker::shutdown(MemTracker::NMT_sequence_overflow);
+  } else {
+    NOT_PRODUCT(_max_seq_number = (seq > _max_seq_number) ? seq : _max_seq_number;)
   }
-  assert(seq > 0, "counter overflow");
-  NOT_PRODUCT(_max_seq_number = (seq > _max_seq_number) ? seq : _max_seq_number;)
   return seq;
 }