[Bug 213900] New: smalltalk-2.1.12-5: printf problems
https://bugzilla.novell.com/show_bug.cgi?id=213900 Summary: smalltalk-2.1.12-5: printf problems Product: openSUSE 10.2 Version: Alpha 5 plus Platform: All OS/Version: SuSE Linux 10.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de I just tried to compile package smalltalk-2.1.12-5 with the GNU C compiler. The compiler said 1. byte.c:275: warning: unknown conversion type character 'O' in format The source code is printf (" = %O", literal_vec[byte & 63]); I have just checked the man page and I agree with the compiler. Perhaps the programmer intended %o instead of %O ? Suggest code rework. 2. byte.c:284: warning: unknown conversion type character 'O' in format byte.c:322: warning: unknown conversion type character 'O' in format byte.c:336: warning: unknown conversion type character 'O' in format byte.c:426: warning: unknown conversion type character 'O' in format byte.c:428: warning: unknown conversion type character 'O' in format byte.c:455: warning: unknown conversion type character 'O' in format byte.c:465: warning: unknown conversion type character 'O' in format byte.c:472: warning: unknown conversion type character 'O' in format byte.c:605: warning: unknown conversion type character 'O' in format Duplicates. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 mhorvath@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |mskibbe@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 mhorvath@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Basesystem |Development -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 mskibbe@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |dcb314@hotmail.com ------- Comment #2 from mskibbe@novell.com 2006-10-23 01:22 MST ------- can you provide a diff? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 dcb314@hotmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|dcb314@hotmail.com | ------- Comment #3 from dcb314@hotmail.com 2006-10-23 03:21 MST ------- (In reply to comment #2)
can you provide a diff?
Sorry, no. Even if I knew what the programmer intended. If my idea is right, then t's a one liner in each case, and so fairly trivial. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 ------- Comment #4 from mskibbe@novell.com 2006-10-24 23:43 MST ------- there are some build problems with your patch on ppc64 and s390x. can you tell me how i can fix this? s390x: /bin/sh ./libtool --tag=CC --mode=link gcc -std=gnu99 -O2 -fmessage-length=0 -Wall -g -Wall -Wno-strict-aliasing -Wno-switch -fno-gcse -fno-strict-aliasing -Wdeclaration-after-statement -Wno-format -Wno-parentheses -Wpointer-arith -Wno-pointer-sign -o gst -export-dynamic main.o libgst/libgst.la -lnsl -lm mkdir .libs gcc -std=gnu99 -O2 -fmessage-length=0 -Wall -g -Wall -Wno-strict-aliasing -Wno-switch -fno-gcse -fno-strict-aliasing -Wdeclaration-after-statement -Wno-format -Wno-parentheses -Wpointer-arith -Wno-pointer-sign -o gst main.o -Wl,--export-dynamic libgst/.libs/libgst.a -ldl -lc -lreadline /usr/lib64/libgmp.so -lnsl -lm sed "s,@\(lispdir\)@,/usr/share/emacs/site-lisp," ./smalltalk-mode.el.in > smalltalk-mode.el sed "s,@\(bindir\)@,/usr/bin," ./gst-mode.el.in > gst-mode.el WARNING: Warnings can be ignored. :-) if test "no" != no; then \ set x; \ list='smalltalk-mode.el gst-mode.el'; for p in $list; do \ if test -f "$p"; then d=; else d="./"; fi; \ set x "$@" "$d$p"; shift; \ done; \ shift; \ EMACS="no" /bin/sh ./config/elisp-comp "$@" || exit 1; \ else : ; fi SMALLTALK_KERNEL="`cd ./kernel; pwd`" \ SMALLTALK_IMAGE="`pwd`" \ ./gst -iQ dummy_file /usr/src/packages/BUILD/smalltalk-2.1.12/kernel/URL.st:80: Aborted /usr/src/packages/BUILD/smalltalk-2.1.12/kernel/URL.st:80: Error occurred while not in byte code interpreter!! [0x3ffffffbbd8] /lib64/libc.so.6(gsignal+0x4c)[0x20000064e9c] /lib64/libc.so.6(abort+0x100)[0x2000006630c] /gst(_gst_mem_alloc+0x3ca)[0x800312c2] /gst(xmalloc+0x14)[0x80031444] /gst(_gst_alloc_bytecodes+0x22)[0x8005d7a6] /gst(_gst_save_bytecode_array+0x1c)[0x8005d7fc] /gst[0x8001844c] /gst[0x80017e9e] /gst[0x80017ed8] make[2]: *** [gst.im] Aborted make[2]: Leaving directory `/usr/src/packages/BUILD/smalltalk-2.1.12' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/packages/BUILD/smalltalk-2.1.12' make: *** [all] Error 2 on ppc64: /bin/sh ./libtool --tag=CC --mode=link gcc -std=gnu99 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -Wno-strict-aliasing -Wno-switch -fno-gcse -fno-strict-aliasing -Wdeclaration-after-statement -Wno-format -Wno-parentheses -Wpointer-arith -Wno-pointer-sign -o gst -export-dynamic main.o libgst/libgst.la -lnsl -lm mkdir .libs gcc -std=gnu99 -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -Wall -Wno-strict-aliasing -Wno-switch -fno-gcse -fno-strict-aliasing -Wdeclaration-after-statement -Wno-format -Wno-parentheses -Wpointer-arith -Wno-pointer-sign -o gst main.o -Wl,--export-dynamic libgst/.libs/libgst.a -ldl -lc -lreadline /usr/lib64/libgmp.so -lnsl -lm sed "s,@\(lispdir\)@,/usr/share/emacs/site-lisp," ./smalltalk-mode.el.in > smalltalk-mode.el sed "s,@\(bindir\)@,/usr/bin," ./gst-mode.el.in > gst-mode.el WARNING: Warnings can be ignored. :-) if test "no" != no; then \ set x; \ list='smalltalk-mode.el gst-mode.el'; for p in $list; do \ if test -f "$p"; then d=; else d="./"; fi; \ set x "$@" "$d$p"; shift; \ done; \ shift; \ EMACS="no" /bin/sh ./config/elisp-comp "$@" || exit 1; \ else : ; fi SMALLTALK_KERNEL="`cd ./kernel; pwd`" \ SMALLTALK_IMAGE="`pwd`" \ ./gst -iQ dummy_file /usr/src/packages/BUILD/smalltalk-2.1.12/kernel/VFS.st:1222: Aborted /usr/src/packages/BUILD/smalltalk-2.1.12/kernel/VFS.st:1222: Error occurred while not in byte code interpreter!! [0x1ffffffb710] /lib64/libc.so.6(abort-0x122858)[0x80000b6288] /gst[0x1002a3b8] /gst(_gst_invoke_croutine-0x60ff8)[0x1002b680] /gst[0x100496e8] /gst(_gst_execute_primitive_operation-0x4cde8)[0x10041570] /gst(_gst_send_message_internal-0x3f54c)[0x1004fcc4] /gst(_gst_interpret-0x38ccc)[0x100566c4] /gst(_gst_nvmsg_send-0x35b50)[0x10059858] /gst(_gst_execute_statements-0x72320)[0x10019458] make[2]: *** [gst.im] Aborted make[2]: Leaving directory `/usr/src/packages/BUILD/smalltalk-2.1.12' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/packages/BUILD/smalltalk-2.1.12' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.68693 (%build) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 ------- Comment #5 from mskibbe@novell.com 2006-10-24 23:45 MST ------- Created an attachment (id=102529) --> (https://bugzilla.novell.com/attachment.cgi?id=102529&action=view) patch described in comment #1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 mskibbe@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |dcb314@hotmail.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 dcb314@hotmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|dcb314@hotmail.com | ------- Comment #6 from dcb314@hotmail.com 2006-10-25 04:52 MST ------- (In reply to comment #4)
can you tell me how i can fix this?
I can offer you some suggestions. 1. I don't understand how the fix you applied produces the two errors you mention. 2. It would be worthwhile to find out what %O and %o do [ by writing a small test program] on the two machine types. 3. use valgrind or gdb to find out what is producing the error message string "Error occurred while not in byte code interpreter!!" 4. If you need any further help, please let me know. These two new errors are most unexpected. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 mskibbe@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|Normal |Minor -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 ------- Comment #7 from mskibbe@novell.com 2006-10-26 05:03 MST ------- i ask the author if they can provide more info about this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 ------- Comment #8 from mskibbe@novell.com 2006-10-27 01:32 MST ------- quote from author(Paolo Bonzini): In my opinion, it's a GCC bug. printf is not the standard library printf in GNU Smalltalk, but defined in snprintf/snprintf.c. %O prints a Smalltalk object and is a pretty handy shortcut. Even if it was the standard library printf, GCC should just wave its hands for the whole strings when it finds an uppercase printf modifier, since those are implementation-defined and glibc does offer the possibility to define modifiers; =>invalid -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 rguenther@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenther@novell.com ------- Comment #9 from rguenther@novell.com 2006-10-27 01:52 MST ------- If you have a testcase that warns with -Wno-format that would be a gcc bug. I don't see where it is defined that uppercase printf modifiers are implementation-defined, I only see that if the format string is invalid the behavior is undefined. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 mskibbe@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |INVALID ------- Comment #10 from mskibbe@novell.com 2006-10-27 02:14 MST ------- i get no error / warning like this if i build the package. the logs tell me that -Wno-format is set => no gcc-bug and no smalltalk-bug. david: please use our patches and our build parameters from specfile to build smalltalk. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 dcb314@hotmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Comment #11 from dcb314@hotmail.com 2006-10-27 03:26 MST ------- (In reply to comment #8)
quote from author(Paolo Bonzini): printf is not the standard library printf in GNU Smalltalk, but defined in snprintf/snprintf.c.
All is explained, but doing your own printf is wrong for two reasons. 1. ISO standard C says you can't provide your own version of printf since printf is reserved for the implementation. 2. From a practical viewpoint, printf is well known. Doing your own version causes programmer confusion, like this bug report. Suggest rename your printf to local_printf or something.
glibc does offer the possibility to define modifiers;
glibc may well do this. ISO standard C says invalid specifier strings lead to undefined behaviour. Suggest follow ISO standard C. The next time I plan to build Smalltalk is about the third or fourth week of November. If that is too far away, let me know. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=213900 mskibbe@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |INVALID ------- Comment #12 from mskibbe@novell.com 2006-10-30 00:47 MST ------- please report this upstream. no bug => invalid -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com