This is the mail archive of the 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]

Re: [asan] Patch - fix an ICE in asan.c

Tobias Burnus wrote:
The attached test case ICEs (segfault) both on the asan branch and on
the trunk with Dodji's patches:

I found another ICE - this time without a patch.

[That's with the patch, which I posted in this thread. Without, one seems to run into the problem I tried to fix with the patch.]

[As ASAN is not yet in the trunk, it is not yet suitable for a PR - but on the other hand, I am afraid that I loose it. Thus, I dump it here, which is also not the best place (sorry).]

The attached code generates (before ASAN):

StringSwitch<T, R>& StringSwitch ...
  <bb 2>:
  _2 = &this_1(D)->Str;
  _3 = StringRef::data (_2);
  memcmp (S_4(D), _3, 7);

And within this basic block, between "_3" and "memcpy", the generated ASAN code is added, which leads to an ICE and 10 times the message.

error: control flow in the middle of basic block 7

If one looks at the asan0 dump (after disabling this part of checking), one finds:

  _52 = _48 & _51;
  if (_52 != 0)
  _53 = (unsigned long) _22;

The "if" line looks odd as one would expect code of this form:

  if (_62 != 0)
    goto <bb 12>;
    goto <bb 11>;

See attachments.


Attachment: fail10.ii
Description: Text document

Attachment: fail10.ii.156t.asan0
Description: Text document

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