Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #5395
Closed
Open
Issue created Mar 04, 2022 by Administrator@rootContributor

Build failure regression: 32-bit Linux with -DCMAKE_C_FLAGS=-m32 instead of CFLAGS=-m32 env var

Created by: SweetVishnya

Describe the bug

Build failure of 32-bit DynamoRIO on Ubuntu 18.04 with gcc 7.5.0.

Is Werror now enabled by default? Is there a way to turn it off in build system?

/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_unix.c:111:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
     ptr_int_t result = (ptr_int_t)retval;
                        ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_unix.c: In function ‘mmap_syscall’:
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_unix.c:135:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
     return (byte *)(ptr_int_t)dynamorio_syscall(
            ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_unix.c: In function ‘os_try_page_size’:
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_unix.c:522:9: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
     if ((ptr_uint_t)addr >= (ptr_uint_t)-4096) /* mmap failed: should not happen */
         ^
In file included from /home/vishnya/fwork/sydr/dynamorio/core/drlibc/../globals.h:93:0,
                 from /home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:37:
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c: In function ‘module_vaddr_from_prog_header’:
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:196:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
                 MIN(min_vaddr, (app_pc)ALIGN_BACKWARD(prog_hdr->p_vaddr, PAGE_SIZE));
                                ^
/home/vishnya/fwork/sydr/dynamorio/core/lib/globals_shared.h:104:32: note: in definition of macro ‘MIN’
 #    define MIN(x, y) ((x) <= (y) ? (x) : (y))
                                ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:196:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
                 MIN(min_vaddr, (app_pc)ALIGN_BACKWARD(prog_hdr->p_vaddr, PAGE_SIZE));
                                ^
/home/vishnya/fwork/sydr/dynamorio/core/lib/globals_shared.h:104:44: note: in definition of macro ‘MIN’
 #    define MIN(x, y) ((x) <= (y) ? (x) : (y))
                                            ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:197:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
             if (min_vaddr == (app_pc)prog_hdr->p_vaddr)
                              ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:198:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
                 first_end = (app_pc)prog_hdr->p_vaddr + prog_hdr->p_memsz;
                             ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c: In function ‘elf_loader_map_phdrs’:
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:456:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
             seg_base = (app_pc)ALIGN_BACKWARD(prog_hdr->p_vaddr, PAGE_SIZE) + delta;
                        ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:502:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
                     file_end = (app_pc)prog_hdr->p_vaddr + prog_hdr->p_filesz;
                                ^
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c: In function ‘elf_loader_find_pt_interp’:
/home/vishnya/fwork/sydr/dynamorio/core/drlibc/drlibc_module_elf.c:544:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
             return (const char *)(phdrs[i].p_vaddr + elf->load_delta);
Assignee
Assign to
Time tracking