Skip to content

Works on debug build, but not on release build. #101130

@OskarKarpinski

Description

@OskarKarpinski

I tried this code:

https://github.com/MedzikUser/rust-issue-101130

I expected it to work in the release build

Instead, this happened work only in debug build

About code:
This is a simple cryptography library which generates encryption key and encode text in build time.

For example, in the release build version if the key during the build is 7. Then during the runtime, key is for example, 39.
image

The same code on debug build always have the same key

image

Meta

rustc --version --verbose:

rustc 1.63.0 (4b91a6ea7 2022-08-08)
binary: rustc
commit-hash: 4b91a6ea7258a947e59c6522cd5898e7c0a6a88f
commit-date: 2022-08-08
host: x86_64-unknown-linux-gnu
release: 1.63.0
LLVM version: 14.0.5

(latest stable)

and

rustc 1.65.0-nightly (eaadb8947 2022-08-27)
binary: rustc
commit-hash: eaadb8947b850a025404082f6297766c4680a42a
commit-date: 2022-08-27
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0

(latest nightly)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions