comparison src/share/vm/code/codeBlob.cpp @ 12146:9758d9f36299

8021954: VM SIGSEGV during classloading on MacOS; hs_err_pid file produced Summary: declare all user-defined operator new()s within Hotspot code with the empty throw() exception specification Reviewed-by: coleenp, twisti, dholmes, hseigel, dcubed, kvn, ccheung Contributed-by: lois.foltan@oracle.com
author coleenp
date Thu, 29 Aug 2013 18:56:29 -0400
parents a7fb14888912
children cefad50507d8 469216acdb28
comparison
equal deleted inserted replaced
12145:cef1e56a4d88 12146:9758d9f36299
1 /* 1 /*
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 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.
243 243
244 return blob; 244 return blob;
245 } 245 }
246 246
247 247
248 void* BufferBlob::operator new(size_t s, unsigned size) { 248 void* BufferBlob::operator new(size_t s, unsigned size) throw() {
249 void* p = CodeCache::allocate(size); 249 void* p = CodeCache::allocate(size);
250 return p; 250 return p;
251 } 251 }
252 252
253 253
345 345
346 return stub; 346 return stub;
347 } 347 }
348 348
349 349
350 void* RuntimeStub::operator new(size_t s, unsigned size) { 350 void* RuntimeStub::operator new(size_t s, unsigned size) throw() {
351 void* p = CodeCache::allocate(size, true); 351 void* p = CodeCache::allocate(size, true);
352 if (!p) fatal("Initial size of CodeCache is too small"); 352 if (!p) fatal("Initial size of CodeCache is too small");
353 return p; 353 return p;
354 } 354 }
355 355
356 // operator new shared by all singletons: 356 // operator new shared by all singletons:
357 void* SingletonBlob::operator new(size_t s, unsigned size) { 357 void* SingletonBlob::operator new(size_t s, unsigned size) throw() {
358 void* p = CodeCache::allocate(size, true); 358 void* p = CodeCache::allocate(size, true);
359 if (!p) fatal("Initial size of CodeCache is too small"); 359 if (!p) fatal("Initial size of CodeCache is too small");
360 return p; 360 return p;
361 } 361 }
362 362