mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-12 21:33:54 +08:00
eh_alloc.cc (__cxa_free_exception): Don't refer to the emergency_buffer using &array[0][0]' notation, use
array'.
* libsupc++/eh_alloc.cc (__cxa_free_exception): Don't refer to the emergency_buffer using `&array[0][0]' notation, use `array'. From-SVN: r121456
This commit is contained in:
parent
b818de221c
commit
20fdc40c5a
@ -1,3 +1,8 @@
|
||||
2007-02-01 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* libsupc++/eh_alloc.cc (__cxa_free_exception): Don't refer to the
|
||||
emergency_buffer using `&array[0][0]' notation, use `array'.
|
||||
|
||||
2007-01-30 Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
PR libstdc++/30571
|
||||
|
@ -143,12 +143,13 @@ __cxxabiv1::__cxa_allocate_exception(std::size_t thrown_size) throw()
|
||||
extern "C" void
|
||||
__cxxabiv1::__cxa_free_exception(void *vptr) throw()
|
||||
{
|
||||
char *base = (char *) emergency_buffer;
|
||||
char *ptr = (char *) vptr;
|
||||
if (ptr >= &emergency_buffer[0][0]
|
||||
&& ptr < &emergency_buffer[0][0] + sizeof (emergency_buffer))
|
||||
if (ptr >= base
|
||||
&& ptr < base + sizeof (emergency_buffer))
|
||||
{
|
||||
const unsigned int which
|
||||
= (unsigned)(ptr - &emergency_buffer[0][0]) / EMERGENCY_OBJ_SIZE;
|
||||
= (unsigned) (ptr - base) / EMERGENCY_OBJ_SIZE;
|
||||
|
||||
__gnu_cxx::__scoped_lock sentry(emergency_mutex);
|
||||
emergency_used &= ~((bitmask_type)1 << which);
|
||||
|
Loading…
Reference in New Issue
Block a user