This is an implementation of project logfind from Learn C The Hard Way.
The number of files that can be used in .logfind is limited to 10 in the .h file. In the future this may be rewritten this to accomadate a dynamic number of rows.
Implementation of project logfind from Learn C The Hard Way
(gdb) run
Starting program: /root/exercise26/./ex26
String: /var/log/messages
String: /var/log/messages.1
String: /var/log/messages.2
*** Error in `/root/exercise26/./ex26': corrupted size vs. prev_size: 0x0000000000602240 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7f474)[0x7ffff7a8c474]
/lib64/libc.so.6(+0x8156b)[0x7ffff7a8e56b]
/root/exercise26/./ex26[0x400870]
/root/exercise26/./ex26[0x400a69]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7ffff7a2f555]
/root/exercise26/./ex26[0x4006f9]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:00 23006 /root/exercise26/ex26
00600000-00601000 r--p 00000000 fd:00 23006 /root/exercise26/ex26
00601000-00602000 rw-p 00001000 fd:00 23006 /root/exercise26/ex26
00602000-00623000 rw-p 00000000 00:00 0 [heap]
7ffff0000000-7ffff0021000 rw-p 00000000 00:00 0
7ffff0021000-7ffff4000000 ---p 00000000 00:00 0
7ffff77f7000-7ffff780c000 r-xp 00000000 fd:00 34397554 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7ffff780c000-7ffff7a0b000 ---p 00015000 fd:00 34397554 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7ffff7a0b000-7ffff7a0c000 r--p 00014000 fd:00 34397554 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7ffff7a0c000-7ffff7a0d000 rw-p 00015000 fd:00 34397554 /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7ffff7a0d000-7ffff7bd1000 r-xp 00000000 fd:00 33589089 /usr/lib64/libc-2.17.so
7ffff7bd1000-7ffff7dd0000 ---p 001c4000 fd:00 33589089 /usr/lib64/libc-2.17.so
7ffff7dd0000-7ffff7dd4000 r--p 001c3000 fd:00 33589089 /usr/lib64/libc-2.17.so
7ffff7dd4000-7ffff7dd6000 rw-p 001c7000 fd:00 33589089 /usr/lib64/libc-2.17.so
7ffff7dd6000-7ffff7ddb000 rw-p 00000000 00:00 0
7ffff7ddb000-7ffff7dfd000 r-xp 00000000 fd:00 33589081 /usr/lib64/ld-2.17.so
7ffff7fef000-7ffff7ff2000 rw-p 00000000 00:00 0
7ffff7ff6000-7ffff7ffa000 rw-p 00000000 00:00 0
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0 [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00021000 fd:00 33589081 /usr/lib64/ld-2.17.so
7ffff7ffd000-7ffff7ffe000 rw-p 00022000 fd:00 33589081 /usr/lib64/ld-2.17.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Program received signal SIGABRT, Aborted.
0x00007ffff7a43387 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-325.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64
(gdb) bt
#0 0x00007ffff7a43387 in raise () from /lib64/libc.so.6
#1 0x00007ffff7a44a78 in abort () from /lib64/libc.so.6
#2 0x00007ffff7a85f67 in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff7a8c474 in malloc_printerr () from /lib64/libc.so.6
#4 0x00007ffff7a8e56b in _int_free () from /lib64/libc.so.6
#5 0x0000000000400870 in cleanup (logfind_dot_file=0x602010, file_list=0x602250) at ex26.c:39
#6 0x0000000000400a69 in main (argc=1, argv=0x7fffffffe088) at ex26.c:66
(gdb)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.