From 45cf315f693e95c4d92f94d29f0b1149a3d6f4e0 Mon Sep 17 00:00:00 2001 From: ElectricAlchemist Date: Wed, 30 Oct 2019 18:51:21 +0100 Subject: [PATCH] opt, failed --- Makefile | 3 +- hello | 2 + ste | Bin 22232 -> 32656 bytes ste.c | 55 +++++++++--------- valog.txt | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 200 insertions(+), 27 deletions(-) create mode 100644 valog.txt diff --git a/Makefile b/Makefile index 9672dff..0e00f2d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ CC=gcc CFLAGS=-Wall -Wextra -pedantic -Werror -OFLAGS=-O3 +#OFLAGS=-O3 +OFLAGS=-g LFLAGS=-lncursesw -ltcmalloc ste: ste.c diff --git a/hello b/hello index e4476b0..f4e5baf 100644 --- a/hello +++ b/hello @@ -4,3 +4,5 @@ hello hello hello hello + +sdsds \ No newline at end of file diff --git a/ste b/ste index ed0cf4d18166351c01062d527625de68b66ed7fe..681b12b278609260997dff6ececf8959ed4d0f89 100755 GIT binary patch literal 32656 zcmeHwdw5jUx%b{PS(6z;?g@lzhMRy$2vqbO_1hqPaDh;o=cN0_t=` zL+z=yGV(mS%WH(bR4;FxI&qy1tysCQiJ9oKpWS~^|^nt0L- z|6kPnWVir49tKjD$Ffu5YNo%U%asg2lv0*upwYV)di3*udg$U=%XNOK;xbeFZ=k97 zNe%VuCN)$~Y^ZOFY@E1p=8TCmrj@icmrQ{J^r-;<4C$3uUuXSo&R?tco%`*rHynQb z&W6PsKdlW$)=-8%&>m%YP~I8N(ZI=9<+{_hwptcxJdTE5ZG3COy+ajt;duZQb(iVI z+z+fT`ll)AzfVD*ox*-|3i&Umpx>Q>K0k&1(JAO04*DwBODX7gq@XWOVgK3`^a&~G zthm1X`C5v6ho_LwO+gQ)pvO|!?@mE~F9rRc6!s6LkbgY|{Y(lvW8=qv^6_mD`ik2R zQqb3@@UsN+e*7mN9LD^~MBvBq-&el1us^a7`8v>YtwEOmT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_$7oS&X=wCEVG?UoExP&h%Y0;*yyE z>S`S4MKlgy)Es#Y+85JYbOX%9qWrh-*Aedm7um3~&aJJu4F@#dVbcvVhC6Sf9qp_P z-y=uM*0*()J=E2VJH47C0#a-1=fxY>GcMcEi2HcTB3s+w&!)H?hf6j^J35yvhFuojAbR132%JdHHnqE>Z6V`G zp|Q0&jO1f+@{G(;2PwlFWMvo=TG7v)L)-r-PUkB$#$x#9;hQ2NY39yAj>kfs-GB(4 zX-Ipy50z9b*QGkvW^yl+JLZz1&YrszFXc z=3nYbx)Cxu6Oz2#cS~AB#t51Dw^7C(Mugspw3qvHNskLfnSN&Zdxd?i(3AUkN#(g1 z+0$8Aru`mZR40@_9^^tpPF?_q_VOH5Qh6RI^)t)=EnzR;U;5ml+_vbGhJt3M|Gf-* zdA=cOB*Q*4{R0{H@*G4`e>!8fBUx|K?O{ZG_=s+nJ};5?HfHKeUef=7t>Unk`|goy zfCy60<}UCOKM4V~J(<4T_sV-QWyg^1Q`*UTd=j?w{?qn%fk8NayG=`Nl732iNl!uI zv`?Ss)Cdz2I)b#5l=k-%?B)JJwT)yxr3+~%`9C8= rows.rownum) break; ln = i + t.cur.off_y; /* Draw the line number */ attron(COLOR_PAIR(1)); - mvprintw(i, 0, "%d", ln + 1); + move(i, 0); + printw("%d", ln + 1); attroff(COLOR_PAIR(1)); lnMove(i, 0); - //if (ln == t.cur.y + t.cur.off_y) attron(COLOR_PAIR(2)); - /* Draw the line matcing render memory */ - if (rows.rw[ln].r_size >= t.cur.off_x) { - addnstr(&rows.rw[ln].render[t.cur.off_x], t.dim.x + 1 - rows.rw[ln].delta); - } - - //attroff(COLOR_PAIR(2)); + addnstr(&rows.rw[ln].render[t.cur.off_x], t.dim.x + 1 - rows.rw[ln].delta); lnMove(++line, 0); } @@ -280,8 +276,7 @@ void drawLines (void) /* Move avoiding the space allocated for line numbers */ void lnMove (int y, int x) { - x += t.pad; - move(y, x); + move(y, x + t.pad); } /* Draw the status bar at the bottom of the screen */ @@ -297,7 +292,7 @@ void drawBar (char *s) for (int i = len; i <= t.dim.x + t.pad; i++) mvaddch(t.dim.y, i, ' '); - char m[40]; + static char m[40]; sprintf(m, "x: %d y: %d Zoom: %c", t.cur.xx, t.cur.yy, whatsThat()); mvaddstr(t.dim.y, t.dim.x + t.pad - strlen(m), m); @@ -308,8 +303,8 @@ void drawBar (char *s) /* convert the cursor matchoing the memory to the drawn one */ int curRealToRender (row *rw, int c_x) { - int r_x = 0; - for (int i = 0; i < c_x; i++) { + static int r_x = 0, i = 0; + for (i = 0, r_x = 0; i < c_x; i++) { if (rw->chars[i] == '\t') r_x += (TABSIZE - 1) - (r_x % TABSIZE); r_x++; } @@ -347,11 +342,16 @@ void fileOpen (char *filename) void rowAddLast (char *s, int len) { /* Extend the block of memory containing the lines */ - rows.rw = realloc(rows.rw, sizeof(row) * (rows.rownum + 1)); + // reallocarray fails safely + row *newr = NULL; + newr = (row*) reallocarray(rows.rw, (rows.rownum + 1), sizeof(*newr)); + if (newr == NULL) termDie("realloc rowAddLast"); + else rows.rw = newr; + //rows.rw = (row*) realloc(rows.rw, sizeof(row) * (rows.rownum + 1)); /* Allocate memory for the line and copy it * at the current row number */ - rows.rw[rows.rownum].chars = malloc(len + 1); + rows.rw[rows.rownum].chars = (char*) malloc(len + 1); memcpy(rows.rw[rows.rownum].chars, s, len); rows.rw[rows.rownum].chars[len] = '\0'; rows.rw[rows.rownum].size = len; @@ -363,7 +363,7 @@ void updateRender (row *rw) { /* count the special characters (only tabs for now) */ int tabs = 0, i; - for (i = 0; i < rw->size; i++) { + for (i = 0; i <= rw->size; i++) { if (rw->chars[i] == '\t') tabs++; } rw->render = NULL; @@ -377,10 +377,11 @@ void updateRender (row *rw) /* put all the characters (substituing all special chars) * into the render buffer */ - int off = 0; - for (i = 0; i < rw->size; i++) { + static int off, j = 0; + off = 0; + for (i = 0; i <= rw->size; i++) { if (rw->chars[i] == '\t') { - for (int j = 0; j < TABSIZE; j++){ + for (j = 0; j < TABSIZE; j++){ if (!j) rw->render[off++] = '|'; else rw->render[off++] = ' '; } @@ -388,6 +389,7 @@ void updateRender (row *rw) rw->render[off++] = rw->chars[i]; } } + off -= 1; rw->render[off] = '\0'; rw->r_size = off; } @@ -407,7 +409,7 @@ void rowAddChar (row *rw, char c) // WIP char *s = rw->chars; // reallocate mem and inc size - rw->chars = malloc(rw->size + 2); + rw->chars = (char*) malloc(rw->size + 2); rw->size++; // copy bf cursor @@ -623,6 +625,7 @@ void rowCpy (row *to, row *from) // WIP { rowFree(to); to->chars = malloc(strlen(from->chars) + 1); + if (to->chars == NULL) termDie("malloc in rowCpy"); to->size = from->size; memcpy(to->chars, from->chars, to->size); updateRender(to); diff --git a/valog.txt b/valog.txt new file mode 100644 index 0000000..f23650f --- /dev/null +++ b/valog.txt @@ -0,0 +1,167 @@ +==27775== Memcheck, a memory error detector +==27775== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. +==27775== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info +==27775== Command: ./ste ste.c +==27775== Parent PID: 25299 +==27775== +==27775== Mismatched free() / delete / delete [] +==27775== at 0x48379AB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x48D8824: ??? (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x400F219: call_init.part.0 (in /usr/lib/ld-2.30.so) +==27775== by 0x400F318: _dl_init (in /usr/lib/ld-2.30.so) +==27775== by 0x40010C9: ??? (in /usr/lib/ld-2.30.so) +==27775== by 0x1: ??? +==27775== by 0x1FFF0008E6: ??? +==27775== by 0x1FFF0008EC: ??? +==27775== Address 0x52ccd20 is 0 bytes inside a block of size 4 alloc'd +==27775== at 0x483750F: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x48D8817: ??? (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x400F219: call_init.part.0 (in /usr/lib/ld-2.30.so) +==27775== by 0x400F318: _dl_init (in /usr/lib/ld-2.30.so) +==27775== by 0x40010C9: ??? (in /usr/lib/ld-2.30.so) +==27775== by 0x1: ??? +==27775== by 0x1FFF0008E6: ??? +==27775== by 0x1FFF0008EC: ??? +==27775== +==27775== Mismatched free() / delete / delete [] +==27775== at 0x48379AB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x4E2B94E: std::__cxx11::basic_string, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.27) +==27775== by 0x4E2CEEA: std::__cxx11::basic_string, std::allocator >::_M_append(char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.27) +==27775== by 0x48EE629: MallocExtension::Initialize() (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x48D8829: ??? (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x400F219: call_init.part.0 (in /usr/lib/ld-2.30.so) +==27775== by 0x400F318: _dl_init (in /usr/lib/ld-2.30.so) +==27775== by 0x40010C9: ??? (in /usr/lib/ld-2.30.so) +==27775== by 0x1: ??? +==27775== by 0x1FFF0008E6: ??? +==27775== by 0x1FFF0008EC: ??? +==27775== Address 0x52cd140 is 0 bytes inside a block of size 23 alloc'd +==27775== at 0x483750F: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x48EE5C7: MallocExtension::Initialize() (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x48D8829: ??? (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x400F219: call_init.part.0 (in /usr/lib/ld-2.30.so) +==27775== by 0x400F318: _dl_init (in /usr/lib/ld-2.30.so) +==27775== by 0x40010C9: ??? (in /usr/lib/ld-2.30.so) +==27775== by 0x1: ??? +==27775== by 0x1FFF0008E6: ??? +==27775== by 0x1FFF0008EC: ??? +==27775== +==27775== Mismatched free() / delete / delete [] +==27775== at 0x48379AB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x48EE63C: MallocExtension::Initialize() (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x48D8829: ??? (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x400F219: call_init.part.0 (in /usr/lib/ld-2.30.so) +==27775== by 0x400F318: _dl_init (in /usr/lib/ld-2.30.so) +==27775== by 0x40010C9: ??? (in /usr/lib/ld-2.30.so) +==27775== by 0x1: ??? +==27775== by 0x1FFF0008E6: ??? +==27775== by 0x1FFF0008EC: ??? +==27775== Address 0x52cd1a0 is 0 bytes inside a block of size 45 alloc'd +==27775== at 0x483750F: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x4E2B8CC: std::__cxx11::basic_string, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.27) +==27775== by 0x4E2CEEA: std::__cxx11::basic_string, std::allocator >::_M_append(char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.27) +==27775== by 0x48EE629: MallocExtension::Initialize() (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x48D8829: ??? (in /usr/lib/libtcmalloc.so.4.5.3) +==27775== by 0x400F219: call_init.part.0 (in /usr/lib/ld-2.30.so) +==27775== by 0x400F318: _dl_init (in /usr/lib/ld-2.30.so) +==27775== by 0x40010C9: ??? (in /usr/lib/ld-2.30.so) +==27775== by 0x1: ??? +==27775== by 0x1FFF0008E6: ??? +==27775== by 0x1FFF0008EC: ??? +==27775== +==27775== Conditional jump or move depends on uninitialised value(s) +==27775== at 0x486C3E4: waddnstr (in /usr/lib/libncursesw.so.6.1) +==27775== by 0x109899: drawLines (ste.c:269) +==27775== by 0x109739: drawScreen (ste.c:240) +==27775== by 0x1093C9: main (ste.c:122) +==27775== +==27775== Conditional jump or move depends on uninitialised value(s) +==27775== at 0x486C3F2: waddnstr (in /usr/lib/libncursesw.so.6.1) +==27775== by 0x109899: drawLines (ste.c:269) +==27775== by 0x109739: drawScreen (ste.c:240) +==27775== by 0x1093C9: main (ste.c:122) +==27775== +==27775== Conditional jump or move depends on uninitialised value(s) +==27775== at 0x486C41B: waddnstr (in /usr/lib/libncursesw.so.6.1) +==27775== by 0x109899: drawLines (ste.c:269) +==27775== by 0x109739: drawScreen (ste.c:240) +==27775== by 0x1093C9: main (ste.c:122) +==27775== +==27775== Invalid read of size 4 +==27775== at 0x10A794: rowAddRow (ste.c:580) +==27775== by 0x109521: main (ste.c:144) +==27775== Address 0x5ae6ef0 is 0 bytes after a block of size 25,760 alloc'd +==27775== at 0x4838D7B: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x109C39: rowAddLast (ste.c:347) +==27775== by 0x109BAB: fileOpen (ste.c:333) +==27775== by 0x109357: main (ste.c:106) +==27775== +==27775== Invalid read of size 8 +==27775== at 0x10A7B8: rowAddRow (ste.c:580) +==27775== by 0x109521: main (ste.c:144) +==27775== Address 0x5ae6ef8 is 8 bytes after a block of size 25,760 alloc'd +==27775== at 0x4838D7B: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x109C39: rowAddLast (ste.c:347) +==27775== by 0x109BAB: fileOpen (ste.c:333) +==27775== by 0x109357: main (ste.c:106) +==27775== +==27775== Conditional jump or move depends on uninitialised value(s) +==27775== at 0x109D9E: updateRender (ste.c:367) +==27775== by 0x10AC66: rowCpy (ste.c:631) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== Uninitialised value was created by a heap allocation +==27775== at 0x483677F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x10AC06: rowCpy (ste.c:627) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== +==27775== Conditional jump or move depends on uninitialised value(s) +==27775== at 0x109E3C: updateRender (ste.c:383) +==27775== by 0x10AC66: rowCpy (ste.c:631) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== Uninitialised value was created by a heap allocation +==27775== at 0x483677F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x10AC06: rowCpy (ste.c:627) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== +==27775== Conditional jump or move depends on uninitialised value(s) +==27775== at 0x4839C78: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x10ABFA: rowCpy (ste.c:627) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== Uninitialised value was created by a heap allocation +==27775== at 0x483677F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x10AC06: rowCpy (ste.c:627) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== +==27775== Conditional jump or move depends on uninitialised value(s) +==27775== at 0x4839C65: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x10ABFA: rowCpy (ste.c:627) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== Uninitialised value was created by a heap allocation +==27775== at 0x483677F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) +==27775== by 0x10AC06: rowCpy (ste.c:627) +==27775== by 0x10A81F: rowAddRow (ste.c:583) +==27775== by 0x109521: main (ste.c:144) +==27775== +==27775== +==27775== HEAP SUMMARY: +==27775== in use at exit: 334,484 bytes in 1,653 blocks +==27775== total heap usage: 30,194 allocs, 28,541 frees, 9,926,406 bytes allocated +==27775== +==27775== LEAK SUMMARY: +==27775== definitely lost: 0 bytes in 0 blocks +==27775== indirectly lost: 0 bytes in 0 blocks +==27775== possibly lost: 0 bytes in 0 blocks +==27775== still reachable: 334,484 bytes in 1,653 blocks +==27775== suppressed: 0 bytes in 0 blocks +==27775== Reachable blocks (those to which a pointer was found) are not shown. +==27775== To see them, rerun with: --leak-check=full --show-leak-kinds=all +==27775== +==27775== For lists of detected and suppressed errors, rerun with: -s +==27775== ERROR SUMMARY: 65744 errors from 12 contexts (suppressed: 0 from 0)