Mageia Bugzilla – Attachment 11661 Details for
Bug 25668
gdb new security issue CVE-2019-1010180
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Extract from a gdb session based on a tutorial.
tutorial (text/plain), 3.94 KB, created by
Len Lawrence
on 2020-05-25 19:52:30 CEST
(
hide
)
Description:
Extract from a gdb session based on a tutorial.
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2020-05-25 19:52:30 CEST
Size:
3.94 KB
patch
obsolete
>$ gdb gfg >(gdb) break findSquare >Breakpoint 1 at 0x401179: file gfg.cpp, line 9. >(gdb) run 10 100 >Starting program: /data/qa/gdb/gfg 10 100 >Missing separate debuginfos, use: debuginfo-install glibc-2.29-20.mga7.x86_64 > >Breakpoint 1, findSquare (a=10) at gfg.cpp:9 >9 return a * a; >Missing separate debuginfos, use: debuginfo-install libgcc1-8.4.0-1.mga7.x86_64 libstdc++6-8.4.0-1.mga7.x86_64 >(gdb) continue >Continuing. >100 > >Breakpoint 1, findSquare (a=100) at gfg.cpp:9 >9 return a * a; >(gdb) c >Continuing. >10000 >[Inferior 1 (process 20955) exited normally] >(gdb) run 1 10 100 >Starting program: /data/qa/gdb/gfg 1 10 100 > >Breakpoint 1, findSquare (a=1) at gfg.cpp:9 >9 return a * a; >(gdb) n >10 } >(gdb) n >1 >main (n=4, args=0x7fffffffd918) at gfg.cpp:14 >14 for (int i = 1; i < n; i++) >..... >main (n=4, args=0x7fffffffd918) at gfg.cpp:14 >14 for (int i = 1; i < n; i++) > >Restart: >$ gdb gfg >(gdb) b main >Breakpoint 1 at 0x401191: file gfg.cpp, line 14. >(gdb) b findSquare >Breakpoint 2 at 0x401179: file gfg.cpp, line 9. >(gdb) delete 2 >(gdb) run 10 >Starting program: /data/qa/gdb/gfg 10 >Missing separate debuginfos, use: debuginfo-install glibc-2.29-20.mga7.x86_64 > >Breakpoint 1, main (n=2, args=0x7fffffffd938) at gfg.cpp:14 >14 for (int i = 1; i < n; i++) >Missing separate debuginfos, use: debuginfo-install libgcc1-8.4.0-1.mga7.x86_64 libstdc++6-8.4.0-1.mga7.x86_64 >(gdb) c >Continuing. >100 >[Inferior 1 (process 22668) exited normally] >(gdb) clear main >Deleted breakpoint 1 >(gdb) run 1 >Starting program: /data/qa/gdb/gfg 1 >1 >[Inferior 1 (process 22882) exited normally] >(gdb) b findSquare >Breakpoint 3 at 0x401179: file gfg.cpp, line 9. >(gdb) info breakpoints >Num Type Disp Enb Address What >3 breakpoint keep y 0x0000000000401179 in findSquare(int) > at gfg.cpp:9 >(gdb) b main >Breakpoint 4 at 0x401191: file gfg.cpp, line 14. >(gdb) disable 3 >(gdb) info breakpoints >Num Type Disp Enb Address What >3 breakpoint keep n 0x0000000000401179 in findSquare(int) > at gfg.cpp:9 >4 breakpoint keep y 0x0000000000401191 in main(int, char**) > at gfg.cpp:14 >(gdb) enable 3 >(gdb) info breakpoints >Num Type Disp Enb Address What >3 breakpoint keep y 0x0000000000401179 in findSquare(int) > at gfg.cpp:9 >4 breakpoint keep y 0x0000000000401191 in main(int, char**) > at gfg.cpp:14 > >Restart: >$ gdb gfg >(gdb) b findSquare >Breakpoint 1 at 0x401179: file gfg.cpp, line 9. >(gdb) b main >Breakpoint 2 at 0x401191: file gfg.cpp, line 14. >(gdb) run 1 10 100 >Starting program: /data/qa/gdb/gfg 1 10 100 >(gdb) checkpoint >checkpoint 1: fork returned pid 24496. >(gdb) continue >Continuing. >Breakpoint 1, findSquare (a=1) at gfg.cpp:9 >9 return a * a; >(gdb) checkpoint >checkpoint 2: fork returned pid 24562. >(gdb) info checkpoints >* 0 process 24352 (main process) at 0x0 > 1 process 24496 at 0x401191, file gfg.cpp, line 14 > 2 process 24562 at 0x401179, file gfg.cpp, line 9 >(gdb) restart 1 >Switching to process 24496 >#0 main (n=4, args=0x7fffffffd918) at gfg.cpp:14 >14 for (int i = 1; i < n; i++) >(gdb) info checkpoints > 0 process 24352 (main process) at 0x401179, file gfg.cpp, line 9 >* 1 process 24496 at 0x401191, file gfg.cpp, line 14 > 2 process 24562 at 0x401179, file gfg.cpp, line 9 >(gdb) restart 0 >Switching to process 24352 >#0 findSquare (a=1) at gfg.cpp:9 >9 return a * a; >(gdb) restart 2 >Switching to process 24562 >#0 findSquare (a=1) at gfg.cpp:9 >9 return a * a; >..... >(gdb) c >Continuing. >10000 >[Inferior 1 (process 24496) exited normally] >[Switching to process 24562] >(gdb) info checkpoints > 0 process 24352 (main process) at 0x401179, file gfg.cpp, line 9 >* 2 process 24562 at 0x401179, file gfg.cpp, line 9 > > >
$ gdb gfg (gdb) break findSquare Breakpoint 1 at 0x401179: file gfg.cpp, line 9. (gdb) run 10 100 Starting program: /data/qa/gdb/gfg 10 100 Missing separate debuginfos, use: debuginfo-install glibc-2.29-20.mga7.x86_64 Breakpoint 1, findSquare (a=10) at gfg.cpp:9 9 return a * a; Missing separate debuginfos, use: debuginfo-install libgcc1-8.4.0-1.mga7.x86_64 libstdc++6-8.4.0-1.mga7.x86_64 (gdb) continue Continuing. 100 Breakpoint 1, findSquare (a=100) at gfg.cpp:9 9 return a * a; (gdb) c Continuing. 10000 [Inferior 1 (process 20955) exited normally] (gdb) run 1 10 100 Starting program: /data/qa/gdb/gfg 1 10 100 Breakpoint 1, findSquare (a=1) at gfg.cpp:9 9 return a * a; (gdb) n 10 } (gdb) n 1 main (n=4, args=0x7fffffffd918) at gfg.cpp:14 14 for (int i = 1; i < n; i++) ..... main (n=4, args=0x7fffffffd918) at gfg.cpp:14 14 for (int i = 1; i < n; i++) Restart: $ gdb gfg (gdb) b main Breakpoint 1 at 0x401191: file gfg.cpp, line 14. (gdb) b findSquare Breakpoint 2 at 0x401179: file gfg.cpp, line 9. (gdb) delete 2 (gdb) run 10 Starting program: /data/qa/gdb/gfg 10 Missing separate debuginfos, use: debuginfo-install glibc-2.29-20.mga7.x86_64 Breakpoint 1, main (n=2, args=0x7fffffffd938) at gfg.cpp:14 14 for (int i = 1; i < n; i++) Missing separate debuginfos, use: debuginfo-install libgcc1-8.4.0-1.mga7.x86_64 libstdc++6-8.4.0-1.mga7.x86_64 (gdb) c Continuing. 100 [Inferior 1 (process 22668) exited normally] (gdb) clear main Deleted breakpoint 1 (gdb) run 1 Starting program: /data/qa/gdb/gfg 1 1 [Inferior 1 (process 22882) exited normally] (gdb) b findSquare Breakpoint 3 at 0x401179: file gfg.cpp, line 9. (gdb) info breakpoints Num Type Disp Enb Address What 3 breakpoint keep y 0x0000000000401179 in findSquare(int) at gfg.cpp:9 (gdb) b main Breakpoint 4 at 0x401191: file gfg.cpp, line 14. (gdb) disable 3 (gdb) info breakpoints Num Type Disp Enb Address What 3 breakpoint keep n 0x0000000000401179 in findSquare(int) at gfg.cpp:9 4 breakpoint keep y 0x0000000000401191 in main(int, char**) at gfg.cpp:14 (gdb) enable 3 (gdb) info breakpoints Num Type Disp Enb Address What 3 breakpoint keep y 0x0000000000401179 in findSquare(int) at gfg.cpp:9 4 breakpoint keep y 0x0000000000401191 in main(int, char**) at gfg.cpp:14 Restart: $ gdb gfg (gdb) b findSquare Breakpoint 1 at 0x401179: file gfg.cpp, line 9. (gdb) b main Breakpoint 2 at 0x401191: file gfg.cpp, line 14. (gdb) run 1 10 100 Starting program: /data/qa/gdb/gfg 1 10 100 (gdb) checkpoint checkpoint 1: fork returned pid 24496. (gdb) continue Continuing. Breakpoint 1, findSquare (a=1) at gfg.cpp:9 9 return a * a; (gdb) checkpoint checkpoint 2: fork returned pid 24562. (gdb) info checkpoints * 0 process 24352 (main process) at 0x0 1 process 24496 at 0x401191, file gfg.cpp, line 14 2 process 24562 at 0x401179, file gfg.cpp, line 9 (gdb) restart 1 Switching to process 24496 #0 main (n=4, args=0x7fffffffd918) at gfg.cpp:14 14 for (int i = 1; i < n; i++) (gdb) info checkpoints 0 process 24352 (main process) at 0x401179, file gfg.cpp, line 9 * 1 process 24496 at 0x401191, file gfg.cpp, line 14 2 process 24562 at 0x401179, file gfg.cpp, line 9 (gdb) restart 0 Switching to process 24352 #0 findSquare (a=1) at gfg.cpp:9 9 return a * a; (gdb) restart 2 Switching to process 24562 #0 findSquare (a=1) at gfg.cpp:9 9 return a * a; ..... (gdb) c Continuing. 10000 [Inferior 1 (process 24496) exited normally] [Switching to process 24562] (gdb) info checkpoints 0 process 24352 (main process) at 0x401179, file gfg.cpp, line 9 * 2 process 24562 at 0x401179, file gfg.cpp, line 9
View Attachment As Raw
Actions:
View
Attachments on
bug 25668
: 11661