Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Pattern Evaluation crashes when certain pragma combination is added #1962

Open
1 task
knight-ryu12 opened this issue Nov 20, 2024 · 1 comment
Open
1 task
Labels
bug Something isn't working

Comments

@knight-ryu12
Copy link

Operating System

Windows

What's the issue you encountered?

Pattern evaluation may crash ImHex with 0xc5 error.

How can the issue be reproduced?

Minimal Reproduction Patterns:

#pragma endian little
#pragma bitfield_order right_to_left
bitfield test1 {
    m1: 12;
    m2: 4;
};

ImHex Version

v1.35.4

ImHex Build Type

  • Nightly or built from sources

Installation type

Installaler

Additional context?

No response

@knight-ryu12 knight-ryu12 added the bug Something isn't working label Nov 20, 2024
@paxcut
Copy link
Contributor

paxcut commented Nov 20, 2024

Actually v1.35.4 crashes if you only add the the now deprecated pragma for bit-field ordering:

#pragma bitfield_order right_to_left

I ran that on the 1.36.0 nightly and instead of a crash I got an error message:

E: error: Pragma 'bitfield_order' is unsupported.
E:   -->   in <Source Code>:2:37
E: 2 | #pragma bitfield_order right_to_left
E:                                         ^

E: Bitfield order can be overridden on a field declaration with the `be` or `le` keywords.
E: error: Value 'right_to_left' cannot be used with the 'bitfield_order' pragma directive.
E:   -->   in <Source Code>:2:1
E: 2 | #pragma bitfield_order right_to_left
E:     ^^^^^^^^^^^^^
I: Evaluation took 0.0773874s

so it looks like it is already fixed but the fix hasn't made it to the release version yet.,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants