Skip to content

Conversation

@dividedmind
Copy link
Contributor

This pull request includes an important refactor in the Parameters class to improve the handling of local variables and parameter names in hopes of fixing #293. The changes focus on iterating through local variables to accurately match slots and handle potential issues with corrupted debug information.

Improvements to local variable handling:

  • agent/src/main/java/com/appland/appmap/output/v1/Parameters.java: Refactored the logic to iterate through local variables to find matching slots for parameters, including handling cases where the debug information might be corrupted. The new approach ensures that parameters are correctly identified even if the local variable table is out of order.

@dividedmind dividedmind self-assigned this Mar 5, 2025
@dividedmind dividedmind force-pushed the fix/more-robust-lvt-handling branch from 9492cf2 to 5b44df8 Compare March 5, 2025 17:06
@dividedmind dividedmind force-pushed the fix/more-robust-lvt-handling branch from 5b44df8 to 06c0688 Compare March 24, 2025 17:30
A user has reported (#293) a crash in LVT handling. While I couldn't
reproduce the crash exactly, I have looked at the relevant code and
made some improvements that will hopefully resolve the problem:
- Ensure correct handling of local variable table that's not in
  slot order. While it usually is the case it's not guaranteed.
- Ensure graceful fallback in case LVT inspection throws; this
  can happen eg. when the debug info is corrupted (maybe
  intentionally by an obfuscator). In this case continue with
  the next argument instead of crashing out.
@dividedmind dividedmind force-pushed the fix/more-robust-lvt-handling branch from 06c0688 to 20dd978 Compare March 24, 2025 17:33
@dividedmind dividedmind merged commit 1f630ff into master Mar 25, 2025
5 checks passed
@dividedmind dividedmind deleted the fix/more-robust-lvt-handling branch March 25, 2025 01:19
@appland-release
Copy link

🎉 This PR is included in version 1.28.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants