Bug 147168 - SbiRuntime::StepPAD is a no-op
Summary: SbiRuntime::StepPAD is a no-op
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2022-02-04 06:41 UTC by Mike Kaganski
Modified: 2023-01-12 12:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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?