Date: Tue, 15 Mar 2016 14:29:51 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 208027] misc/mc: 4.8.16 has undefined havior in its code and gcc generates "ud2a" instruction to produce SIGILL in 9.x Message-ID: <bug-208027-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208027 Bug ID: 208027 Summary: misc/mc: 4.8.16 has undefined havior in its code and gcc generates "ud2a" instruction to produce SIGILL in 9.x Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: eugen@grosbein.net CC: woodsb02@gmail.com Flags: maintainer-feedback?(woodsb02@gmail.com) CC: woodsb02@gmail.com Created attachment 168240 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D168240&action= =3Dedit fix undefined behavior While building mc-4.8.16 under FreeBSD 9.x using system gcc 4.2.1, one obtains a warning: interface.c: In function 'mc_open': interface.c:203: warning: 'mode_t' is promoted to 'int' when passed through '...' interface.c:203: warning: (so you should pass 'int' not 'mode_t' to 'va_arg= ') interface.c:203: note: if this code is reached, the program will abort interface.c:203: warning: will never be executed gcc generates instruction "ud2a" for the code and mc crashes with SIGILL wh= en it calls mc_open() function to create a file, e.g. while copying a file to another directory or saving a file in the mcedit. A patch is attached. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-208027-13>