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

Side by Side Diff: src/x64/regexp-macro-assembler-x64.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, 3 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/ia32/regexp-macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 // Current string. 1178 // Current string.
1179 bool is_ascii = subject->IsAsciiRepresentationUnderneath(); 1179 bool is_ascii = subject->IsAsciiRepresentationUnderneath();
1180 1180
1181 ASSERT(re_code->instruction_start() <= *return_address); 1181 ASSERT(re_code->instruction_start() <= *return_address);
1182 ASSERT(*return_address <= 1182 ASSERT(*return_address <=
1183 re_code->instruction_start() + re_code->instruction_size()); 1183 re_code->instruction_start() + re_code->instruction_size());
1184 1184
1185 MaybeObject* result = Execution::HandleStackGuardInterrupt(); 1185 MaybeObject* result = Execution::HandleStackGuardInterrupt();
1186 1186
1187 if (*code_handle != re_code) { // Return address no longer valid 1187 if (*code_handle != re_code) { // Return address no longer valid
1188 intptr_t delta = *code_handle - re_code; 1188 intptr_t delta = code_handle->address() - re_code->address();
1189 // Overwrite the return address on the stack. 1189 // Overwrite the return address on the stack.
1190 *return_address += delta; 1190 *return_address += delta;
1191 } 1191 }
1192 1192
1193 if (result->IsException()) { 1193 if (result->IsException()) {
1194 return EXCEPTION; 1194 return EXCEPTION;
1195 } 1195 }
1196 1196
1197 Handle<String> subject_tmp = subject; 1197 Handle<String> subject_tmp = subject;
1198 int slice_offset = 0; 1198 int slice_offset = 0;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 } 1401 }
1402 } 1402 }
1403 1403
1404 #undef __ 1404 #undef __
1405 1405
1406 #endif // V8_INTERPRETED_REGEXP 1406 #endif // V8_INTERPRETED_REGEXP
1407 1407
1408 }} // namespace v8::internal 1408 }} // namespace v8::internal
1409 1409
1410 #endif // V8_TARGET_ARCH_X64 1410 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/regexp-macro-assembler-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698