Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: src/ia32/regexp-macro-assembler-ia32.cc

Issue 7744051: Fix for a possible bug in RegExp stack guard. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/x64/regexp-macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 // Current string. 1073 // Current string.
1074 bool is_ascii = subject->IsAsciiRepresentationUnderneath(); 1074 bool is_ascii = subject->IsAsciiRepresentationUnderneath();
1075 1075
1076 ASSERT(re_code->instruction_start() <= *return_address); 1076 ASSERT(re_code->instruction_start() <= *return_address);
1077 ASSERT(*return_address <= 1077 ASSERT(*return_address <=
1078 re_code->instruction_start() + re_code->instruction_size()); 1078 re_code->instruction_start() + re_code->instruction_size());
1079 1079
1080 MaybeObject* result = Execution::HandleStackGuardInterrupt(); 1080 MaybeObject* result = Execution::HandleStackGuardInterrupt();
1081 1081
1082 if (*code_handle != re_code) { // Return address no longer valid 1082 if (*code_handle != re_code) { // Return address no longer valid
1083 int delta = *code_handle - re_code; 1083 int delta = code_handle->address() - re_code->address();
1084 // Overwrite the return address on the stack. 1084 // Overwrite the return address on the stack.
1085 *return_address += delta; 1085 *return_address += delta;
1086 } 1086 }
1087 1087
1088 if (result->IsException()) { 1088 if (result->IsException()) {
1089 return EXCEPTION; 1089 return EXCEPTION;
1090 } 1090 }
1091 1091
1092 Handle<String> subject_tmp = subject; 1092 Handle<String> subject_tmp = subject;
1093 int slice_offset = 0; 1093 int slice_offset = 0;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 } 1268 }
1269 1269
1270 1270
1271 #undef __ 1271 #undef __
1272 1272
1273 #endif // V8_INTERPRETED_REGEXP 1273 #endif // V8_INTERPRETED_REGEXP
1274 1274
1275 }} // namespace v8::internal 1275 }} // namespace v8::internal
1276 1276
1277 #endif // V8_TARGET_ARCH_IA32 1277 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/x64/regexp-macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698