Menu

#423 Crash(assertion failure) at ASFormatter.cpp, line 3229 (Reopen)

closed-fixed
crash (1)
2017-04-09
2017-02-15
Li Minggang
No

The original one is @ https://sourceforge.net/p/astyle/bugs/422/.

I tried released one, say, Astyle 2.06. It also crashed with the same root cause.

Use --max-code-length=200 -p d:\1.txt to reproduce and debug.

The content of 1.txt is as below(only one line).

) ? (

The root cause is the buggy code below:

else if (sequence == "+" || sequence == "-" || **sequence == "?**")
{
    if (charNum > 0
            && !isInExponent()
            && (isLegalNameChar(currentLine[charNum - 1])

isInExponent() would assert failure/crash if sequence is '?'.

Discussion

  • Li Minggang

    Li Minggang - 2017-02-20

    BTW: You should use debug version instead of release one because it's assertion failure.

     
  • Jim Pattee

    Jim Pattee - 2017-02-20
    • status: open --> open-fixed
    • assigned_to: Jim Pattee
     
  • Jim Pattee

    Jim Pattee - 2017-02-20

    Fixed.

     
  • Li Minggang

    Li Minggang - 2017-02-21

    Where can I get the latest code? I need to merge the fix to my copy. Thanks! It seemed that the code in SF is not the latest.

     
  • Jim Pattee

    Jim Pattee - 2017-02-21

    It will be available with the next commit to subversion. I need to add a few more changes. It should be available in a few days.

     
  • Jim Pattee

    Jim Pattee - 2017-04-09
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB