Hide Forgot
Description of problem: i7z crashes in Print_Information_Processor(). There's a type confusion in the second argument to this function: on function entry gdb reports both arguments as 64-bit memory pointers, but within the function the second argument is interpreted as 32-bit and causes SEGV Version-Release number of selected component (if applicable): i7z-0.27.2-11.fc23.x86_64 How reproducible: every time Steps to Reproduce: 1. run i7v from command line (no arguments) Actual results: $ i7z i7z DEBUG: i7z version: svn-r77-(20-Nov-2011) i7z DEBUG: Found Intel Processor i7z DEBUG: Stepping 9 i7z DEBUG: Model a i7z DEBUG: Family 6 i7z DEBUG: Processor Type 0 i7z DEBUG: Extended Model 3 i7z DEBUG: msr = Model Specific Register i7z DEBUG: Detected an ivy bridege processor Segmentation fault (core dumped) Expected results: program runs, produces complete output, does not SEGV
GDB session log is below. Note how in the Breakpoint 1, gdb reports both nehalem and sandy_bridge arguments as 64-bit pointers, but just few lines down, after the call to get_vendor(vendor_string), sandy_bridge is overwritten/truncated to 32 bits. Note that I misspoke in the first comment: this is not a wrong type (sandy_bridge is int * all along); it just accidentally gets a wrong value. (gdb) b Print_Information_Processor Breakpoint 1 at 0x2e90: file helper_functions.c, line 344. (gdb) r Starting program: /usr/sbin/i7z [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". i7z DEBUG: i7z version: svn-r77-(20-Nov-2011) Breakpoint 1, Print_Information_Processor (nehalem=0x55555576125c <prog_options+4>, sandy_bridge=0x55555576125d <prog_options+5>) at helper_functions.c:344 344 { (gdb) n 348 memset(vendor_string,0,13); (gdb) 350 get_vendor (vendor_string); (gdb) p sandy_bridge $1 = (int *) 0x55555576125d <prog_options+5> (gdb) n 367 if (strcmp (vendor_string, "GenuineIntel") == 0) { (gdb) p sandy_bridge $2 = (int *) 0x5576125d
Strangely, the program runs correctly, doesn't crash, and doesn't raise any errors when run under valgrind
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
*** Bug 1279250 has been marked as a duplicate of this bug. ***
Thanks for debugging. Will push a new build shortly. Please try with it to reproduce this bug.
i7z-0.27.2-13.20131012git5023138.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0cf4a693dc
i7z-0.27.2-13.20131012git5023138.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fb51f84a82
i7z-0.27.2-13.20131012git5023138.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0cf4a693dc
i7z-0.27.2-13.20131012git5023138.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fb51f84a82
i7z-0.27.2-13.20131012git5023138.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
i7z-0.27.2-13.20131012git5023138.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.