Describe the bug
The script RecoverClassesFromRTTIScript.java terminates with StackOverflowError.
To Reproduce
Steps to reproduce the behavior:
Run the script RecoverClassesFromRTTIScript.java
Wait until the script starts to run processInlinedConstructorsAndDestructors, the exception occurs if a function A calls B and B calls A.
Expected behavior
The script must finish without exceptions.
Attachments
If applicable, please attach any files that caused problems or log files generated by the software.
Environment (please complete the following information):
OS: Windows 11
Java Version: 21
Ghidra Version: 11.2-DEV
Ghidra Origin: locally built using master branch, commit 3588ecdab7e77ad388a2d8d591ca4596367cc6df
Additional context
java.lang.reflect.InvocationTargetException
at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisWorkerCommand.applyTo(AutoAnalysisManager.java:1705)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisWorkerCommand.applyTo(AutoAnalysisManager.java:1586)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisTaskWrapper.run(AutoAnalysisManager.java:660)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:760)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:639)
at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:604)
at ghidra.app.plugin.core.analysis.AnalysisBackgroundCommand.applyTo(AnalysisBackgroundCommand.java:55)
at ghidra.app.plugin.core.analysis.AnalysisBackgroundCommand.applyTo(AnalysisBackgroundCommand.java:33)
at ghidra.framework.plugintool.mgr.BackgroundCommandTask.run(BackgroundCommandTask.java:103)
at ghidra.framework.plugintool.mgr.ToolTaskManager.run(ToolTaskManager.java:351)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.StackOverflowError
at java.base/java.util.HashMap.putVal(HashMap.java:635)
at java.base/java.util.HashMap.put(HashMap.java:618)
at db.NodeMgr.addNode(NodeMgr.java:209)
at db.FixedKeyNode.<init>(FixedKeyNode.java:61)
at db.FixedKeyInteriorNode.<init>(FixedKeyInteriorNode.java:52)
at db.NodeMgr.getFixedKeyNode(NodeMgr.java:304)
at db.Table.getFieldKeyNode(Table.java:166)
at db.Table$ShortDurationFieldKeyIterator.initialize(Table.java:3852)
at db.Table$ShortDurationFieldKeyIterator.<init>(Table.java:3826)
at db.Table$FieldKeyIterator.<init>(Table.java:3370)
at db.Table.fieldKeyIterator(Table.java:2005)
at db.FieldIndexTable$PrimaryKeyIterator.<init>(FieldIndexTable.java:493)
at db.FieldIndexTable.keyIterator(FieldIndexTable.java:410)
at db.Table.indexIterator(Table.java:1569)
at ghidra.program.database.util.AddressRangeMapDB.getAddressSet(AddressRangeMapDB.java:360)
at ghidra.program.database.symbol.NamespaceManager.getAddressSet(NamespaceManager.java:305)
at ghidra.program.database.symbol.NamespaceManager.getAddressSet(NamespaceManager.java:283)
at ghidra.program.database.function.FunctionDB.getBody(FunctionDB.java:353)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:415)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
at classrecovery.RecoveredClassHelper.getFunctionCallMap(RecoveredClassHelper.java:439)
Describe the bug The script RecoverClassesFromRTTIScript.java terminates with StackOverflowError.
To Reproduce Steps to reproduce the behavior:
Expected behavior The script must finish without exceptions.
Attachments If applicable, please attach any files that caused problems or log files generated by the software.
Environment (please complete the following information):
Additional context