Bug 147168

Summary: SbiRuntime::StepPAD is a no-op
Product: LibreOffice Reporter: Mike Kaganski <mikekaganski>
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: andreas.heinisch, aron.budea
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 143781    

Description Mike Kaganski 2022-02-04 06:41:26 UTC
SbiRuntime::StepPAD (basic/source/runtime/runtime.cxx) only works with local variables, and never changes anything outside, nor returns a result. So it is a no-op.

It is related to SbiOpcode::PAD_ -> SbiParser::Assign -> SbiToken::LET, and thus implements something in LET (assignment) statement. Given that it had been such a no-op since very long (commit 6702bc37d4bc28ec45c6c25f6a953997f6999270) without obvious reported problems, and its related code may be in compiled images in existing documents, the idea is that we could stop emitting it when compiling (SbiParser::Assign), and change its implementation to the real no-op (only maybe calling GetTOS in StepPAD, which may change the state).

Or we should check if commit 6702bc37d4bc28ec45c6c25f6a953997f6999270, that changed from working with non-const String& into local OUString did regress something, and we need to put the modified data back?