This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC 5.3.0: ASAN gives "unknown-crash" error


Hi all; I'm trying to upgrade my compiler from 4.9.0 to 5.3.0.  I've
compiled my own version of both of these from source.  I'm using
binutils 2.25.1 also built myself, if it matters.

My system is a large C++ program.  Building and testing it using GCC
5.3.0 works fine, no problems.  My problem is that I use ASAN for
testing quite a bit, and when I build with GCC 4.9.0 ASAN I get no
errors but when I build with GCC 5.3.0 ASAN I get various errors.

Now, it could be that there's a problem with my code that wasn't being
caught with 4.9.0 and is being caught with 5.3.0.  However, the ASAN
output says this:

==7750==ERROR: AddressSanitizer: unknown-crash on address 0x7f8522ce3850 
  at pc 0x0000008a3784 bp 0x7fff20876dd0 sp 0x7fff20876dc8
  WRITE of size 800008 at 0x7f8522ce3850 thread T0

First, is there any way to know what "unknown-crash" means?

Second, the code pointed to by the stack trace is a compare/exchange
primitive (unfortunately this part has not been converted to C++11 so
it's using GCC primitives still):

  #0 0x8a3783 in PHashTable<PCT, 100001u>::insertT(PCT*, bool) /src/Platform/PHashTable.h:113

and the code at that line is:

  if (__sync_bool_compare_and_swap(tptr + slot, current, t)) {

As this is a CAS operation I don't understand the message "WRITE of size
800008"... ?

The allocation statement is:

0x7f8522d6bca8 is located 0 bytes to the right of 832680-byte region [0x7f8522ca0800,0x7f8522d6bca8)
  allocated by thread T0 here:

I'm trying to understand if there is a problem with GCC 5.3.0's ASAN
implementation, a problem with my code, or some combination.  Any info
anyone can provide would be appreciated!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]