RESOLVED INVALID 27874
Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
https://bugs.webkit.org/show_bug.cgi?id=27874
Summary Change malloc to fastMalloc and free to fastFree in Yarr's RegexInterpreter.cpp
Zoltan Horvath
Reported 2009-07-31 04:21:13 PDT
Use fastMalloc and fastFree instead of malloc and free in RegexInterpreter.cpp's methods.
Attachments
proposed patch (2.54 KB, patch)
2009-07-31 04:24 PDT, Zoltan Horvath
no flags
Zoltan Horvath
Comment 1 2009-07-31 04:24:22 PDT
Created attachment 33870 [details] proposed patch
Eric Seidel (no email)
Comment 2 2009-07-31 15:29:17 PDT
Comment on attachment 33870 [details] proposed patch Clearing review flag on attachment: 33870 Committing to http://svn.webkit.org/repository/webkit/trunk ... M JavaScriptCore/ChangeLog M JavaScriptCore/yarr/RegexInterpreter.cpp Committed r46643 M JavaScriptCore/yarr/RegexInterpreter.cpp M JavaScriptCore/ChangeLog r46643 = 2fe77a59e15a22979daaf74b11f4283d9b4f2186 (trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk http://trac.webkit.org/changeset/46643
Eric Seidel (no email)
Comment 3 2009-07-31 15:29:20 PDT
All reviewed patches have been landed. Closing bug.
Gavin Barraclough
Comment 4 2009-08-04 14:36:35 PDT
Unfortunately this change break the v8 tests (as run in the sunspider command-line harness), so reverted for now in r46778.
Eric Seidel (no email)
Comment 5 2009-08-04 14:38:32 PDT
Can you define "break"? :)
Gavin Barraclough
Comment 6 2009-08-04 14:47:02 PDT
Long hang spinning the cpu, then a crash. Smells like something going off the deep end of the stack, but I'm afraid I don't really have time to debug this regression further right now.
Zoltan Horvath
Comment 7 2009-08-05 00:17:18 PDT
Weird. Was it on a MAC, wasn't it?
Eric Seidel (no email)
Comment 8 2009-08-05 07:19:55 PDT
It sounds like either the conversion to fastMalloc/fastFree was incomplete here, or that by changing over to fastMalloc we've tripped some other subtle bug in the regexp engine. The latter is bad news and requires further investigation. I worry that the current use of malloc/free could just be papering over some underlying bug, given Gavin's above comment.
Gavin Barraclough
Comment 9 2009-08-05 12:45:06 PDT
It might be worth noting that these mallocs and frees will just go away at some point – these will be replaced with a stack-based allocator, though I don't have a timescale for this right now.
Gavin Barraclough
Comment 10 2009-08-05 14:07:10 PDT
(In reply to comment #7) > Weird. Was it on a MAC, wasn't it? This is on Mac, testing the YARR interpreter by setting: #define ENABLE_YARR 1 #define ENABLE_YARR_JIT 0
Gavin Barraclough
Comment 11 2011-06-16 21:50:25 PDT
These allocations are now stack based, and as such this change is no longer valid.
Note You need to log in before you can comment on or make changes to this bug.