You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MIT uses Ubuntu on their machines, and on their athena machine, I compiled Elvis there and for some time it worked, until about a year ago. There must have been a hardware or distribution upgrade or something. THe current CPU is an Intel(R) Xeon(R) CPU E5-2665 0 @ 2.40GHz, running six cores. (40 gigs of RAM).
Elvis started dumping core after only moving around the file with navigation keys. My compilation flags are:
gcc -O2 -ansi
-ansi is used because getline() is confused with the one in stdio.h
This causes a flurry of warnings (this has always been my experience), so I added a -w flag. The warnings consisted of errors such as this random sampling out of the hundreds received:
osunix/osblock.c: In function ‘blkopen’:
osunix/osblock.c:201:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
(void)write(fd, (char *)buf, sizeof buf->super);
^
osunix/osprg.c: In function ‘prgopen’:
osunix/osprg.c:97:8: warning: ignoring return value of ‘dup’, declared with attribute warn_unused_result [-Wunused-result]
dup(r0w1[0]);
In file included from elvis.h:143:0,
from lowbuf.c:9:
lowbuf.c: In function ‘delblock’:
session.h:97:38: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define SES_MAXBLKLIST ((o_blksize - (int)(((BLK *)0)->blklist.blk)) / sizeof(((BLK *)0)->blklist.blk[0]))
lowbuf.c:445:28: note: in expansion of macro ‘SES_MAXSUPER’
for (i = 0; (unsigned)i < SES_MAXSUPER; i++)
^
osunix/tcaphelp.c: In function ‘ttywrite’:
osunix/tcaphelp.c:109:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(ttyscr, buf, (size_t)len);
^
guix11/guix11.c: In function ‘loadresources’:
guix11/guix11.c:399:25: warning: assignment makes pointer from integer without a cast [enabled by default]
resources[i].string = strdup(value.addr);
^
and so on.
Running Elvis causes a segfault as stated earlier after a few key movements, which I shall show here:
Concerning your compile problems: to me using '-ansi' seems wrong, because the Elvis sources are not ISO-C compliant, it's traditional C. Do you use the `configure' script for generating your Makefile? If you have trouble doing this, can you describe what you do and show me the output? Also, which gcc version are you using?
I propose to get a clean build running as mentioned above. If there are still coredumps then, you could probably try to generate a bit more information for tracking down the problem: compile Elvis for debugging, run it in 'valgrind' and send me its output or (if you haven't got access to 'valgrind') 'gdb' (and send me the output of the 'bt' command after the crash)?
MIT uses Ubuntu on their machines, and on their athena machine, I compiled Elvis there and for some time it worked, until about a year ago. There must have been a hardware or distribution upgrade or something. THe current CPU is an Intel(R) Xeon(R) CPU E5-2665 0 @ 2.40GHz, running six cores. (40 gigs of RAM).
Elvis started dumping core after only moving around the file with navigation keys. My compilation flags are:
gcc -O2 -ansi
-ansi is used because getline() is confused with the one in stdio.h
This causes a flurry of warnings (this has always been my experience), so I added a -w flag. The warnings consisted of errors such as this random sampling out of the hundreds received:
and so on.
Running Elvis causes a segfault as stated earlier after a few key movements, which I shall show here:
Hope this helps.
Paul King
The text was updated successfully, but these errors were encountered: