Mercurial > hg > graal-compiler
comparison src/share/vm/services/memPtr.cpp @ 12198: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 | 4102b59539ce |
children |
comparison
equal
deleted
inserted
replaced
12157:35b99e7e0af2 | 12198:baa7927dfbd2 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
32 | 32 |
33 jint SequenceGenerator::next() { | 33 jint SequenceGenerator::next() { |
34 jint seq = Atomic::add(1, &_seq_number); | 34 jint seq = Atomic::add(1, &_seq_number); |
35 if (seq < 0) { | 35 if (seq < 0) { |
36 MemTracker::shutdown(MemTracker::NMT_sequence_overflow); | 36 MemTracker::shutdown(MemTracker::NMT_sequence_overflow); |
37 } else { | |
38 NOT_PRODUCT(_max_seq_number = (seq > _max_seq_number) ? seq : _max_seq_number;) | |
37 } | 39 } |
38 assert(seq > 0, "counter overflow"); | |
39 NOT_PRODUCT(_max_seq_number = (seq > _max_seq_number) ? seq : _max_seq_number;) | |
40 return seq; | 40 return seq; |
41 } | 41 } |
42 | 42 |