Date: Tue, 15 Oct 2019 07:08:06 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 241258] Error building 12.1-RC1 from 11.3, "jevents" program getting a sigsegv in /usr/src/lib/libpmc/pmu-events Message-ID: <bug-241258-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241258 Bug ID: 241258 Summary: Error building 12.1-RC1 from 11.3, "jevents" program getting a sigsegv in /usr/src/lib/libpmc/pmu-events Product: Base System Version: 12.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: sigsys@gmail.com buildworld failed like that while trying to build 12.1-RC1 (as of r353451) = on a 11.3-RELEASE-p1 system: --- libpmc_events.c --- ./pmu-events/jevents "x86" /usr/src/lib/libpmc/pmu-events/arch libpmc_event= s.c Segmentation fault *** [libpmc_events.c] Error code 139 make[5]: stopped in /usr/src/lib/libpmc 1 error With this change it doesn't fail anymore: Index: lib/libpmc/pmu-events/jevents.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/libpmc/pmu-events/jevents.c (revision 353534) +++ lib/libpmc/pmu-events/jevents.c (working copy) @@ -119,8 +119,7 @@ char *e =3D s + strlen(s); /* Remove trailing dots that look ugly in perf list */ - --e; - while (e >=3D s && isspace(*e)) + while (e > s && isspace(e[-1])) --e; if (*e =3D=3D '.') *e =3D 0; Dunno if the problem happens because of something specific to this system b= ut this loop is wrong nevertheless (it could access before the string if it was empty or all spaces). --=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-241258-227>