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

Typo in ARM opnd_compute_address_priv caught by GCC 7.3.0 #2900

Open
egrimley opened this issue Mar 26, 2018 · 1 comment
Open

Typo in ARM opnd_compute_address_priv caught by GCC 7.3.0 #2900

egrimley opened this issue Mar 26, 2018 · 1 comment

Comments

@egrimley
Copy link
Contributor

egrimley commented Mar 26, 2018

With the GCC in Debian unstable I got this warning:

/.../dynamorio/core/arch/opnd_shared.c:1920:72: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
                 (TEST(EFLAGS_C, mc->cpsr) ? (1 << (sizeof(reg_t)*8-1)) : 0);
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

GCC deserves a pat on the head for this, because it seems to have caught a real bug: the || at the end of line 1919 should be a |, I think. What the code seems to be doing is computing the effective address when RRX is used in an address calculation: a very weird thing to do, so it's not surprising if it was never tested. (Is there a place where a test for this could easily be added? Not worth adding a new top-level test just for this.)

@derekbruening
Copy link
Contributor

It would be nice to have a test for this RRX code: we could re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants