Opened 9 years ago

Closed 6 years ago

Last modified 5 years ago

#12442 closed bug (duplicate)

Unit tests crash with segment violation in heap-management code

Reported by: simonsouth Owned by: nobody
Priority: normal Milestone:
Component: System Version: R1/Development
Keywords: unittests Cc:
Blocked By: #14376 Blocking:
Platform: x86-64

Description

Running UnitTester on x86_64 crashes in BApplication::QuitTest4 with a segment violation. Debug report attached.

The location of the actual crash varies between (at least) insert_chunk and hoardUnsbrk in arch-specific.cpp but the root cause seems to always be corruption of the heap's free-chunk list, sFreeChunks, possibly due to the (lack of) locking the unit test performs.

Note this test runs fine on x86_gcc2, so the problem is something x86_64-specific.

Attachments (1)

UnitTester-1852-debug-31-10-2015-16-26-51.report (37.0 KB ) - added by simonsouth 9 years ago.
Debug report

Download all attachments as: .zip

Change History (4)

by simonsouth, 9 years ago

Debug report

comment:1 by pulkomandy, 9 years ago

To debug memory allocation problems, you can use LD_PRELOAD=/system/lib/libroot_debug.so ./program. This replaces libroot with a version using a slower version of malloc that takes care of erasing freed blocks, and other protection measures, and can detect some errors earlier and closer to the point where they happen.

comment:2 by waddlesplash, 6 years ago

Blocked By: 14376 added
Resolution: duplicate
Status: newclosed

#14376 is a duplicate but has more information.

comment:3 by nielx, 5 years ago

Milestone: Unscheduled

Remove milestone for tickets with status = closed and resolution != fixed

Note: See TracTickets for help on using tickets.