mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 518427 - TM: fix valgrind error in jsregexp.cpp, r=dmandelin.
This commit is contained in:
parent
f0b694edca
commit
232e0c7e37
@ -3083,12 +3083,12 @@ class RegExpNativeCompiler {
|
||||
|
||||
Allocator &alloc = *JS_TRACE_MONITOR(cx).dataAlloc;
|
||||
|
||||
GuardRecord* guard = (GuardRecord *)
|
||||
alloc.alloc(sizeof(GuardRecord) +
|
||||
sizeof(SideExit) +
|
||||
(re_length-1) * sizeof(jschar));
|
||||
memset(guard, 0, sizeof(*guard));
|
||||
SideExit* exit = (SideExit*)(guard+1);
|
||||
size_t len = (sizeof(GuardRecord) +
|
||||
sizeof(VMSideExit) +
|
||||
(re_length-1) * sizeof(jschar));
|
||||
GuardRecord* guard = (GuardRecord *) alloc.alloc(len);
|
||||
memset(guard, 0, len);
|
||||
VMSideExit* exit = (VMSideExit*)(guard+1);
|
||||
guard->exit = exit;
|
||||
guard->exit->target = fragment;
|
||||
fragment->lastIns = lir->insGuard(LIR_x, NULL, guard);
|
||||
|
Loading…
Reference in New Issue
Block a user