Skip to content

Commit faeea07

Browse files
committed
8319747: galoisCounterMode_AESCrypt stack walking broken
Reviewed-by: kvn, sviswanathan
1 parent b4c2d1c commit faeea07

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ address StubGenerator::generate_galoisCounterMode_AESCrypt() {
260260
#endif
261261
__ movptr(subkeyHtbl, subkeyH_mem);
262262
__ movptr(counter, counter_mem);
263-
// Save rbp and rsp
264-
__ push(rbp);
265-
__ movq(rbp, rsp);
266263
// Align stack
267264
__ andq(rsp, -64);
268265
__ subptr(rsp, 96 * longSize); // Create space on the stack for htbl entries
@@ -272,12 +269,12 @@ address StubGenerator::generate_galoisCounterMode_AESCrypt() {
272269

273270
__ vzeroupper();
274271

275-
__ movq(rsp, rbp);
276-
__ pop(rbp);
277-
278272
// Restore state before leaving routine
279273
#ifdef _WIN64
274+
__ lea(rsp, Address(rbp, -6 * wordSize));
280275
__ pop(rsi);
276+
#else
277+
__ lea(rsp, Address(rbp, -5 * wordSize));
281278
#endif
282279
__ pop(rbx);
283280
__ pop(r15);

0 commit comments

Comments
 (0)