Skip to content

Commit

Permalink
8319747: galoisCounterMode_AESCrypt stack walking broken
Browse files Browse the repository at this point in the history
Reviewed-by: kvn, sviswanathan
  • Loading branch information
djelinski committed Nov 16, 2023
1 parent b4c2d1c commit faeea07
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,6 @@ address StubGenerator::generate_galoisCounterMode_AESCrypt() {
#endif
__ movptr(subkeyHtbl, subkeyH_mem);
__ movptr(counter, counter_mem);
// Save rbp and rsp
__ push(rbp);
__ movq(rbp, rsp);
// Align stack
__ andq(rsp, -64);
__ subptr(rsp, 96 * longSize); // Create space on the stack for htbl entries
Expand All @@ -272,12 +269,12 @@ address StubGenerator::generate_galoisCounterMode_AESCrypt() {

__ vzeroupper();

__ movq(rsp, rbp);
__ pop(rbp);

// Restore state before leaving routine
#ifdef _WIN64
__ lea(rsp, Address(rbp, -6 * wordSize));
__ pop(rsi);
#else
__ lea(rsp, Address(rbp, -5 * wordSize));
#endif
__ pop(rbx);
__ pop(r15);
Expand Down

1 comment on commit faeea07

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.