-
Notifications
You must be signed in to change notification settings - Fork 58
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
Invalid Memory Reference on --release builds (only) #73
Comments
Quick debugging points to the member function |
Had first break through regarding this today. Adding the following to [profile.release]
opt-level = 0 @jramapuram So, our initial guess about something is being moved by compiler optimization might be the most probable reason behind this issue. |
This is definitely not a solution though. We can't be removing optimization |
Of course!, this justs confirms it is optimization that is causing it. No matter what's the optimization level ([1|2|3]) it just crashes if it's not zero. |
I believe that we are improperly using the static assignment methods though. So in reality we are doing something incorrectly. Something the compiler is designed to optimize away is in fact being optimized away. |
Most probably, and that is what i am trying to figure out, if it is statics or the references or the combination. |
@jramapuram Wooho! looks like fixed, problem was what i suspected initially, the function get_type was using 8-bit integer to get the type of data(enum) from FFI call |
Nice work @9prady9 ! I'm still confused why this was happening while using the static error handling stuff though! |
Can you check if u8 is being used for enums elsewhere? |
@pavanky I already changed others before publishing 3.3.1 crate. @jramapuram May be no one used this( Edited: |
Note: This happens only with
cargo run --release
Stack trace:
Multiple runs cause different issues:
The text was updated successfully, but these errors were encountered: