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

Compilation error on Ubuntu #80

Open
johnfxgalea opened this issue Mar 9, 2020 · 3 comments
Open

Compilation error on Ubuntu #80

johnfxgalea opened this issue Mar 9, 2020 · 3 comments

Comments

@johnfxgalea
Copy link

johnfxgalea commented Mar 9, 2020

I'm trying to compile DECAF on my i686 Ubuntu 14.04 machine, and am facing some compiler issues.

In particular, I am getting the following error:

In file included from DECAF/decaf/softmmu_template.h:398:0,
                 from DECAF/decaf/target-i386/op_helper.c:5002:
DECAF/decaf/softmmu_taint_template.h: In function ‘taint_slow_stl_mmu’:
DECAF/decaf/softmmu_taint_template.h:469:13: warning: passing argument 1 of ‘__taint_stl_raw’ makes pointer from integer without a cast [enabled by default]
             glue(glue(__taint_st, SUFFIX), _raw)((unsigned long)(addr+addend),addr);
             ^
In file included from DECAF/decaf/target-i386/../shared/tainting/taintcheck_opt.h:23:0,
                 from DECAF/decaf/target-i386/op_helper.c:31:
DECAF/decaf/target-i386/../shared/tainting/taint_memory.h:114:14: note: expected ‘void *’ but argument is of type ‘long unsigned int’
 void REGPARM __taint_stl_raw(void * p, gva_t vaddr);
              ^
In file included from DECAF/decaf/softmmu_template.h:398:0,
                 from DECAF/decaf/target-i386/op_helper.c:5005:
DECAF/decaf/softmmu_taint_template.h: In function ‘__taint_ldq_mmu’:
DECAF/decaf/softmmu_taint_template.h:143:13: warning: passing argument 1 of ‘__taint_ldq_raw’ makes pointer from integer without a cast [enabled by default]
             glue(glue(__taint_ld, SUFFIX), _raw)((unsigned long)(addr+addend),addr);
             ^
In file included from DECAF/decaf/target-i386/../shared/tainting/taintcheck_opt.h:23:0,
                 from DECAF/decaf/target-i386/op_helper.c:31:
DECAF/decaf/target-i386/../shared/tainting/taint_memory.h:106:14: note: expected ‘void *’ but argument is of type ‘long unsigned int’
 void REGPARM __taint_ldq_raw(void * p, gva_t vaddr);
              ^
In file included from DECAF/decaf/softmmu_template.h:398:0,
                 from DECAF/decaf/target-i386/op_helper.c:5005:
DECAF/decaf/softmmu_taint_template.h: In function ‘taint_slow_ldq_mmu’:
DECAF/decaf/softmmu_taint_template.h:235:13: warning: passing argument 1 of ‘__taint_ldq_raw’ makes pointer from integer without a cast [enabled by default]
             glue(glue(__taint_ld, SUFFIX), _raw)((unsigned long)(addr+addend),addr);
             ^
In file included from DECAF/decaf/target-i386/../shared/tainting/taintcheck_opt.h:23:0,
                 from DECAF/decaf/target-i386/op_helper.c:31:
DECAF/decaf/target-i386/../shared/tainting/taint_memory.h:106:14: note: expected ‘void *’ but argument is of type ‘long unsigned int’
 void REGPARM __taint_ldq_raw(void * p, gva_t vaddr);
              ^
In file included from DECAF/decaf/softmmu_template.h:398:0,
                 from DECAF/decaf/target-i386/op_helper.c:5005:
DECAF/decaf/softmmu_taint_template.h: In function ‘__taint_stq_mmu’:
DECAF/decaf/softmmu_taint_template.h:382:13: warning: passing argument 1 of ‘__taint_stq_raw’ makes pointer from integer without a cast [enabled by default]
             glue(glue(__taint_st, SUFFIX), _raw)((unsigned long)(addr+addend),addr);
             ^
In file included from DECAF/decaf/target-i386/../shared/tainting/taintcheck_opt.h:23:0,
                 from DECAF/decaf/target-i386/op_helper.c:31:
DECAF/decaf/target-i386/../shared/tainting/taint_memory.h:115:14: note: expected ‘void *’ but argument is of type ‘long unsigned int’
 void REGPARM __taint_stq_raw(void * p, gva_t vaddr);
              ^
In file included from DECAF/decaf/softmmu_template.h:398:0,
                 from DECAF/decaf/target-i386/op_helper.c:5005:
DECAF/decaf/softmmu_taint_template.h: In function ‘taint_slow_stq_mmu’:
DECAF/decaf/softmmu_taint_template.h:469:13: warning: passing argument 1 of ‘__taint_stq_raw’ makes pointer from integer without a cast [enabled by default]
             glue(glue(__taint_st, SUFFIX), _raw)((unsigned long)(addr+addend),addr);
             ^
In file included from DECAF/decaf/target-i386/../shared/tainting/taintcheck_opt.h:23:0,
                 from DECAF/decaf/target-i386/op_helper.c:31:
DECAF/decaf/target-i386/../shared/tainting/taint_memory.h:115:14: note: expected ‘void *’ but argument is of type ‘long unsigned int’
 void REGPARM __taint_stq_raw(void * p, gva_t vaddr);
              ^
DECAF/decaf/target-i386/op_helper.c: In function ‘helper_flds_FT0’:
DECAF/decaf/target-i386/op_helper.c:3648:6: error: frame pointer required, but reserved
 void helper_flds_FT0(uint32_t val)
      ^
In file included from DECAF/decaf/target-i386/op_helper.c:22:0:
DECAF/decaf/dyngen-exec.h:64:20: note: for ‘env’
 register CPUState *env asm(AREG0);

It seems like this issue has been encountered before: https://groups.google.com/forum/#!msg/decaf-platform-discuss/eFYLlRxaOGg/hv2_2Y6tJaUJ

Finally, my configure command is as follows:

./configure --enable-tcg-taint --target-list=i386-softmmu

Can anybody help me resolve the issue please?

@johnfxgalea
Copy link
Author

I switched to a 64-bit host and it compiled albeit with some warnings. Given the errors above, I think there is code that is 64-bit specific which therefore yields errors on 32-bit hosts.

@enlighten5
Copy link
Contributor

Hi,
I think you are right. I noticed that this issue is only associated with 32-bit systems and compilers.
It's most likely a bug in the compiler (specifically gcc-4.8 or newer). See this report for more information: https://www.mail-archive.com/[email protected]/msg428450.html
I do not have a fix for this currently, but FYI, I tried gcc-4.7 on a 32-bit system and it works.

@johnfxgalea
Copy link
Author

Thanks for the info!

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

No branches or pull requests

2 participants