Wireshark mailing list archives
Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC)
From: Bálint Réczey <balint () balintreczey hu>
Date: Mon, 25 Nov 2013 02:37:52 +0100
2013/11/25 Guy Harris <guy () alum mit edu>:
On Nov 24, 2013, at 2:59 PM, Guy Harris <guy () alum mit edu> wrote:I've removed -ftrapv; we'll see what that does.That fixed it. Either Lemon is explicitly depending on wrap-around on signed integer overflow, or implicitly depending on a lack of trapping for signed integer overflow; in the latter case, perhaps it should be checked to see whether that's a bug.
I tried to trigger a crash using GCC and -ftrapv without success while the clang-compiled binary crashed as expected: test.c: #include <limits.h> #include <stdio.h> int main () { int i = INT_MAX - 1, b = 100; #ifdef TEST if ((i + b) < i) { printf("overflow!\n"); return 1; } #endif i += b; printf("res:%d\n",i); return 0; } $ gcc -ftrapv -o test.out test.c && ./test.out res:-2147483550 $ gcc -DTEST -ftrapv -o test.out test.c && ./test.out overflow! $ clang -DTEST -ftrapv -o test.out test.c && ./test.out Illegal instruction $ clang -ftrapv -o test.out test.c && ./test.out Illegal instruction I agree that -ftrapv seems to be unreliable on GCC or at least it has more complicated semantics than I expected. The lemon crash is interesting anyway. Can we somehow obtain the core file? Cheers, Balint PS: Thanks for removing -ftrapv, I think having the rest of the new flags enabled make sense. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 24)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 24)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 24)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Bálint Réczey (Nov 24)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 25)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 25)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 25)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Bálint Réczey (Nov 25)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 25)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Bálint Réczey (Nov 28)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 24)
- Re: Lemon crashing on Solaris? (was Re: [Wireshark-commits] buildbot failure in Wireshark (development) on Solaris-10-SPARC) Guy Harris (Nov 24)