RESOLVED FIXED 115782
Crash properly on iOS
https://bugs.webkit.org/show_bug.cgi?id=115782
Summary Crash properly on iOS
Benjamin Poulain
Reported 2013-05-08 02:01:30 PDT
Crash properly on iOS
Attachments
Patch (2.61 KB, patch)
2013-05-08 02:02 PDT, Benjamin Poulain
no flags
Patch (2.80 KB, patch)
2013-05-08 17:18 PDT, Benjamin Poulain
no flags
Patch (4.19 KB, patch)
2013-05-11 00:26 PDT, Benjamin Poulain
no flags
Benjamin Poulain
Comment 1 2013-05-08 02:02:46 PDT
EFL EWS Bot
Comment 2 2013-05-08 02:10:23 PDT
EFL EWS Bot
Comment 3 2013-05-08 02:11:18 PDT
Early Warning System Bot
Comment 4 2013-05-08 02:11:42 PDT
Early Warning System Bot
Comment 5 2013-05-08 02:13:50 PDT
Build Bot
Comment 6 2013-05-08 02:26:31 PDT
Alexey Proskuryakov
Comment 7 2013-05-08 09:38:49 PDT
Comment on attachment 201045 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=201045&action=review I'm concerned that this change will break aggregation with existing crash reports. Can you try a known crash with and without this change to compare? > Source/WTF/wtf/Assertions.cpp:343 > + ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ This comment now looks as if it claims that this is more reliable than __builtin_trap().
Benjamin Poulain
Comment 8 2013-05-08 16:33:29 PDT
Benjamin Poulain
Comment 9 2013-05-08 16:44:16 PDT
(In reply to comment #7) > (From update of attachment 201045 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=201045&action=review > > I'm concerned that this change will break aggregation with existing crash reports. Can you try a known crash with and without this change to compare? You have WTFCrash on top for crash reporter. Would that be a problem? WTFReportBacktrace already skip 2 frames so it is just one level deeper. > > Source/WTF/wtf/Assertions.cpp:343 > > + ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ > > This comment now looks as if it claims that this is more reliable than __builtin_trap(). To be honest I have no clue what this comment mean by "More reliable".
Benjamin Poulain
Comment 10 2013-05-08 17:18:02 PDT
Build Bot
Comment 11 2013-05-08 17:43:08 PDT
Darin Adler
Comment 12 2013-05-09 18:23:35 PDT
Comment on attachment 201117 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=201117&action=review This changes things so that all crashes happen inside a function. The old code went out of its way to crash at the call site, not inside a function. I think the reason we wanted that was to make debugging easier. Not sure if that is important any more. Seems a little risky to change, though. I’m assuming the Windows build failures are due to changes in the exported symbols that are needed. > Source/WTF/wtf/Assertions.cpp:333 > +static void invokeCrashHook() > { > if (globalHook) > globalHook(); > } Why is this still a function? Why not just call the hook directly in WTFCrash? > Source/WTF/wtf/Assertions.cpp:339 > + (*(int *)(uintptr_t)0xbbadbeef = 0); There are extra unneeded parentheses here. > Source/WTF/wtf/Assertions.cpp:344 > + (*(int *)(uintptr_t)0xbbadbeef = 0); > +#if COMPILER(CLANG) > + __builtin_trap(); > +#else > + ((void(*)())0)(); > +#endif Really could use a why comment explaining the bbadbeef thing.
Darin Adler
Comment 13 2013-05-09 18:24:57 PDT
(In reply to comment #9) > > > Source/WTF/wtf/Assertions.cpp:343 > > > + ((void(*)())0)(); /* More reliable, but doesn't say BBADBEEF */ > > > > This comment now looks as if it claims that this is more reliable than __builtin_trap(). > > To be honest I have no clue what this comment mean by "More reliable". More reliable meant that in some cases accessing 0xbbadbeef would not cause a crash. That could be valid memory that happens to be mapped in, particularly on a 64-bit system. Whereas calling 0 or __builtin_trap was guaranteed to actually cause a crash.
Benjamin Poulain
Comment 14 2013-05-11 00:26:30 PDT
Benjamin Poulain
Comment 15 2013-05-16 12:02:39 PDT
Comment on attachment 201451 [details] Patch Clearing flags on attachment: 201451 Committed r150196: <http://trac.webkit.org/changeset/150196>
Benjamin Poulain
Comment 16 2013-05-16 12:02:45 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.