-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix #33, Resolve print format mismatches on 32-bit host #36
Conversation
@astrogeco ready for CCB (no label yet) |
Thanks for the tag, I added the label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes so far look OK, but it seems like some casts are still missing.
if (Verbose) printf(" sh_size = 0x%08lx\n", SectionHeader->Shdr64.sh_size); | ||
if (Verbose) printf(" sh_addr = 0x%lx\n", (long unsigned int)SectionHeader->Shdr64.sh_addr); | ||
if (Verbose) printf(" sh_offset = 0x%08lx\n", (long unsigned int)SectionHeader->Shdr64.sh_offset); | ||
if (Verbose) printf(" sh_size = 0x%08lx\n", (long unsigned int)SectionHeader->Shdr64.sh_size); | ||
if (Verbose) printf(" sh_link = 0x%08x\n", SectionHeader->Shdr64.sh_link); | ||
if (Verbose) printf(" sh_info = 0x%08x\n", SectionHeader->Shdr64.sh_info); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For instance wouldn't the "sh_link" and "sh_info" need the same cast? (these are also words of different lengths depending on arch/binary format).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified pull request, urgent fix is for vxworks6.9, MCP750. As you mention, likely requires more casts for other systems but not a certification priority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this related to VxWorks exactly? The tool runs on the host machine, not on VxWorks. Are the mismatches specific to running it on a 32-bit host machine vs 64-bit host machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True enough, this is a 32 bit host. I only fixed the issues that showed up for the vxworks build on the 32 bit host. I should have better described the test system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that makes more sense. But I'm still not an advocate of just minimally squelching the visible warnings on a specific 32-bit host (IIRC the machine with the VxWorks 6.9 tools is a 32-bit RHEL 6.x host). Other compilers/libraries might flag other printfs. Unless we actually add all the needed casts, warnings are likely reappear again as soon as someone builds on another system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a step in the right direction, and removes a cert blocker. Making it work across compilers/libraries is a very valid open source concern, but not my priority.
With the the pull request title change this is even more unclear -- this tool doesn't have anything to do with VxWorks .... this tool is compiled for and runs on the build host no matter what the target OS is. |
Good point. Likely an indication of too little time and too much work. |
20200422 CCB - APPROVED |
Describe the contribution
Casts where needed for print formatting on 32-bit host
Fix #33
Testing performed
Steps taken to test the contribution:
Expected behavior changes
Builds for vxworks w/ 32-bit host
System(s) tested on
Additional context
None (this isn't the only issue on vxworks, but haven't written them up yet)
Third party code
None
Contributor Info - All information REQUIRED for consideration of pull request
Jacob Hageman - NASA/GSFC