lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Dec 2015 17:48:27 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Jiri Olsa <jolsa@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Martin Liska <mliska@...e.cz>
Subject: [RFC] The -Og debugging experience

heya,
using the -Og for DEBUG=1 builds gives me many 'optimized out' stuff

It was introduced in here:
  e8b7ea4356fd perf tools: Improve setting of gcc debug option

- here's backtrace from segfault I was looking at, current code:

(gdb) bt
#0  0x00000000004b490f in parse_events__scan_string (yystr=yystr@...ry=0x0, yyscanner=0x1916be0) at util/parse-events-flex.c:3353
#1  0x000000000048fe6f in parse_events__scanner (str=0x0, data=data@...ry=0x7fffffffdac0, start_token=start_token@...ry=258)
    at util/parse-events.c:1356
#2  0x0000000000491775 in parse_events (evlist=evlist@...ry=0x1917c90, str=<optimized out>, err=err@...ry=0x0) at util/parse-events.c:1401
#3  0x0000000000468bf6 in __perf_evsel__name_array_test (names=0x872c00 <perf_evsel.sw_names>, nr_names=nr_names@...ry=11)
    at tests/evsel-roundtrip-name.c:74
#4  0x0000000000468f13 in test__perf_evsel__roundtrip_name_test (subtest=<optimized out>) at tests/evsel-roundtrip-name.c:106
#5  0x000000000045a2c8 in run_test (test=test@...ry=0x86fe50 <generic_tests+400>, subtest=subtest@...ry=-1) at tests/builtin-test.c:241
#6  0x000000000045a3a1 in test_and_print (t=t@...ry=0x86fe50 <generic_tests+400>, force_skip=force_skip@...ry=false,
    subtest=subtest@...ry=-1) at tests/builtin-test.c:268
#7  0x000000000045a5cd in __cmd_test (argc=argc@...ry=1, argv=argv@...ry=0x7fffffffe200, skiplist=0x0) at tests/builtin-test.c:324
#8  0x000000000045a8a9 in cmd_test (argc=1, argv=0x7fffffffe200, prefix=<optimized out>) at tests/builtin-test.c:416
#9  0x00000000004784a9 in run_builtin (p=p@...ry=0x871e18 <commands+504>, argc=argc@...ry=2, argv=argv@...ry=0x7fffffffe200) at perf.c:387
#10 0x00000000004786a4 in handle_internal_command (argc=2, argv=0x7fffffffe200) at perf.c:448
#11 0x0000000000478710 in run_argv (argcp=argcp@...ry=0x7fffffffe06c, argv=argv@...ry=0x7fffffffe060) at perf.c:492
#12 0x0000000000478981 in main (argc=2, argv=0x7fffffffe200) at perf.c:609


- and same crash with above patch reverted:

(gdb) bt
#0  0x00007ffff573f36a in strlen () from /lib64/libc.so.6
#1  0x00000000004f458b in parse_events__scan_string (yystr=0x0, yyscanner=0x1985be0) at util/parse-events-flex.c:3353
#2  0x00000000004bc752 in parse_events__scanner (str=0x0, data=0x7fffffffda50, start_token=258) at util/parse-events.c:1356
#3  0x00000000004bc8e2 in parse_events (evlist=0x1986c90, str=0x0, err=0x0) at util/parse-events.c:1401
#4  0x00000000004837c4 in __perf_evsel__name_array_test (names=0x8e1140 <perf_evsel.sw_names>, nr_names=11)
    at tests/evsel-roundtrip-name.c:74
#5  0x0000000000483969 in test__perf_evsel__roundtrip_name_test (subtest=-1) at tests/evsel-roundtrip-name.c:106
#6  0x000000000047099b in run_test (test=0x8de030 <generic_tests+400>, subtest=-1) at tests/builtin-test.c:241
#7  0x0000000000470ae3 in test_and_print (t=0x8de030 <generic_tests+400>, force_skip=false, subtest=-1) at tests/builtin-test.c:268
#8  0x0000000000470d71 in __cmd_test (argc=1, argv=0x7fffffffe200, skiplist=0x0) at tests/builtin-test.c:324
#9  0x00000000004711c4 in cmd_test (argc=1, argv=0x7fffffffe200, prefix=0x0) at tests/builtin-test.c:416
#10 0x0000000000498070 in run_builtin (p=0x8dfe58 <commands+504>, argc=2, argv=0x7fffffffe200) at perf.c:387
#11 0x00000000004982de in handle_internal_command (argc=2, argv=0x7fffffffe200) at perf.c:448
#12 0x000000000049842a in run_argv (argcp=0x7fffffffe05c, argv=0x7fffffffe050) at perf.c:492
#13 0x0000000000498786 in main (argc=2, argv=0x7fffffffe200) at perf.c:609


I haven't tracked the history of -Og, maybe it gets better from some gcc version?

If there's no clue, I rather revert this one, because it does
provide the proper debugging experience ;-)

thoughts?
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ