Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/reflection.cpp @ 10379:efe8b7d64424
6726963: multi_allocate() call does not CHECK_NULL and causes crash in fastdebug bits
Summary: Using CHECK_NULL when calling multi_allocate() from the corresponding reflection code; added test for this condition
Reviewed-by: dholmes, minqi
Contributed-by: Mikhailo Seledtsov <mikhailo.seledtsov@oracle.com>
author | ctornqvi |
---|---|
date | Fri, 31 May 2013 20:24:58 +0200 |
parents | a589c78a8811 |
children | 4552a7633a07 |
comparison
equal
deleted
inserted
replaced
10378:a589c78a8811 | 10379:efe8b7d64424 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 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. |
373 } | 373 } |
374 dim += k_dim; | 374 dim += k_dim; |
375 } | 375 } |
376 } | 376 } |
377 klass = klass->array_klass(dim, CHECK_NULL); | 377 klass = klass->array_klass(dim, CHECK_NULL); |
378 oop obj = ArrayKlass::cast(klass)->multi_allocate(len, dimensions, THREAD); | 378 oop obj = ArrayKlass::cast(klass)->multi_allocate(len, dimensions, CHECK_NULL); |
379 assert(obj->is_array(), "just checking"); | 379 assert(obj->is_array(), "just checking"); |
380 return arrayOop(obj); | 380 return arrayOop(obj); |
381 } | 381 } |
382 | 382 |
383 | 383 |