question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] chained unary operators are not pushed correctly to stack

See original GitHub issue

Consider these examples:

int a = 0;
a = -~a;
return a; // returns 1 in c#, EE crashes
int a = 0;
a = +-+-+-+-+a;
return a; // returns 0 in c#, EE crashes
int a = 0;
a = a >> +-+-+-+2 << +-+-+-+-2 >> +-+-+-+-+2 << +-+-+-+-+2;
return a; // returns 0 in c#, EE crashes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
codingsebcommented, Mar 14, 2021

Great job sorting this out! I’ve tested chained unary operators branch and found no issues.

@lofcz yes all your examples were already working. I just made it work for custom left operands only operators.

I just published version 1.4.25.0 that manage this issue. Thanks again for all @lofcz

1reaction
codingsebcommented, Mar 12, 2021

OK I think I am close to the solution. Just need to make one or two more tests and I will publish it. It’s coming very soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

handling chained unary operators in shunting yard
There is a - on operator stack and we should pop it into output queue. We then push the token onto operator stack....
Read more >
Worked example: A stack based calculator · F# for Fun and Profit
If you are not familiar with a stack based calculator, it works as follows: numbers are pushed on a stack, and operations such...
Read more >
[prefer-readonly-parameter-types] `isTypeReadonly` stack ...
I have tried restarting my IDE and the issue persists. I have updated to the latest version of the packages. I have read...
Read more >
Should I fully parenthesize expressions or rely on ...
Good developers strive to write code that is clear and correct. Parentheses in conditionals, even if they are not strictly required, ...
Read more >
Online Stack Overflow Detection on the TMS320C28x DSP
Facilities exist on the TMS320C28x™ DSP that, when properly configured, allow for runtime detection of a stack overflow before it occurs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found