Skip to content

Fix format specifiers for 32-bit architectures - #5557

Merged
GMNGeoffrey merged 1 commit into
iree-org:mainfrom
GMNGeoffrey:fix-32-bit-printf
Apr 21, 2021
Merged

GMNGeoffrey merged 1 commit into
iree-org:mainfrom
GMNGeoffrey:fix-32-bit-printf

Conversation

@GMNGeoffrey

@GMNGeoffrey GMNGeoffrey commented Apr 21, 2021 •

Copy link
Copy Markdown
Member

Otherwise we get an error about narrowing from 64 to 32 bit on 32-bit
architectures. This wasn't caught because we don't have any tests of
32-bit architectures in OSS (but we do internally at Google).

iree/hal/local/elf/elf_module.c:157:11: error: format specifies type
'size_t' (aka 'unsigned int') but the argument has type
'iree_elf64_off_t' (aka 'unsigned long long') [-Werror,-Wformat]
          phdr->p_offset, phdr->p_offset + phdr->p_filesz,

So longer term fixes are to add a 32-bit build bot and create format
specifiers for IREE's types (so we don't just have to widen
everywhere), but this unblocks integration for now.

@google-cla google-cla Bot added the cla: yes label Apr 21, 2021
@GMNGeoffrey
GMNGeoffrey requested a review from benvanik April 21, 2021 21:16
@GMNGeoffrey
GMNGeoffrey merged commit 8879dcd into iree-org:main Apr 21, 2021
@GMNGeoffrey
GMNGeoffrey deleted the fix-32-bit-printf branch April 21, 2021 22:01
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

Successfully merging this pull request may close these issues.

2 participants