Hello:
Back to the patch#866 problem I'm having. I'm using vim 7.4.1416:
* using efence: links fine, but won't run (runs out of memory)
* using valgrind: works
* using valgrind --leak-check=full: works
As can be seen from the trace below, the program hangs in a call to
nanosleep
in mch_delay(). The parameters to the nanosleep call seem to me to be
correct.
I put in the following code in mch_delay to force HAVE_USLEEP at line 632:
#undef HAVE_NANOSLEEP
#ifndef HAVE_USLEEP
# define HAVE_USLEEP
#endif
This, too, "fixes" the problem. I wrote a small program which exercises
nanosleep with the same time delay (5ms) and it doesn't hang. So, its
not clear to me whether there's a vim source bug, a compiler bug, or o/s
bug.
So: is there a configure option to disable HAVE_NANOSLEEP?
Regards,
Chip Campbell
gdb Debugging Trace
---------------------------------------------------------------------
(gdb) where
#0 0x00000038a3e0eff0 in __nanosleep_nocancel () from
/lib64/libpthread.so.0
#1 0x000000000055b5b0 in mch_delay (msec=50, ignoreinput=1) at
os_unix.c:638
#2 0x00000000005f5e61 in ui_delay (msec=50, ignoreinput=1) at ui.c:251
#3 0x00000000004ea8c6 in ServerWait (dpy=0xd38600, w=98566147,
endCond=0x4eadcc <WaitForReply>, endData=0x7fff004deb10,
localLoop=0, seconds=-1) at if_xcmdsrv.c:633
#4 0x00000000004eae42 in serverReadReply (dpy=0xd38600, win=98566147,
str=0x7fff004deb70, localLoop=0) at if_xcmdsrv.c:821
#5 0x0000000000478620 in f_remote_read (argvars=0x7fff004decc0,
rettv=0x7fff004df4a0) at eval.c:17009
#6 0x000000000046b0d2 in call_func (funcname=0x1050b50
"remote_read(serverid)", len=11, rettv=0x7fff004df4a0, argcount=1,
argvars=0x7fff004decc0, firstline=5, lastline=5,
doesrange=0x7fff004dee9c, evaluate=1, selfdict=0x0) at eval.c:8913
#7 0x000000000046ab2e in get_func_tv (name=0x1050b50
"remote_read(serverid)", len=11, rettv=0x7fff004df4a0, arg=
0x7fff004df450, firstline=5, lastline=5, doesrange=0x7fff004dee9c,
evaluate=1, selfdict=0x0) at eval.c:8712
#8 0x0000000000465ba0 in eval7 (arg=0x7fff004df450,
rettv=0x7fff004df4a0, evaluate=1, want_string=0) at eval.c:5245
#9 0x00000000004653eb in eval6 (arg=0x7fff004df450,
rettv=0x7fff004df4a0, evaluate=1, want_string=0) at eval.c:4896
#10 0x0000000000464f9a in eval5 (arg=0x7fff004df450,
rettv=0x7fff004df4a0, evaluate=1) at eval.c:4712
#11 0x0000000000464507 in eval4 (arg=0x7fff004df450,
rettv=0x7fff004df4a0, evaluate=1) at eval.c:4407
#12 0x0000000000464357 in eval3 (arg=0x7fff004df450,
rettv=0x7fff004df4a0, evaluate=1) at eval.c:4322
#13 0x00000000004641ca in eval2 (arg=0x7fff004df450,
rettv=0x7fff004df4a0, evaluate=1) at eval.c:4254
#14 0x0000000000463ffd in eval1 (arg=0x7fff004df450,
rettv=0x7fff004df4a0, evaluate=1) at eval.c:4182
#15 0x0000000000463f58 in eval0 (arg=0x1050b50 "remote_read(serverid)",
rettv=0x7fff004df4a0, nextcmd=0x7fff004df568,
evaluate=1) at eval.c:4142
#16 0x000000000045fa00 in ex_let (eap=0x7fff004df560) at eval.c:1957
#17 0x00000000004a36ef in do_one_cmd (cmdlinep=0x7fff004dfbf8,
sourcing=1, cstack=0x7fff004df750, fgetline=
0x4a0fd4 <get_loop_line>, cookie=0x7fff004df6c0) at ex_docmd.c:2930
#18 0x00000000004a0439 in do_cmdline (cmdline=0x0, fgetline=0x488468
<get_func_line>, cookie=0x1061d40, flags=7)
at ex_docmd.c:1116
#19 0x00000000004879ab in call_user_func (fp=0x1041ac0, argcount=1,
argvars=0x7fff004e0140, rettv=0x7fff004e0310, firstline=
5, lastline=5, selfdict=0x0) at eval.c:25127
#20 0x000000000046af93 in call_func (funcname=0x1021ef0 "pchk#PChk",
len=9, rettv=0x7fff004e0310, argcount=1, argvars=
0x7fff004e0140, firstline=5, lastline=5, doesrange=0x7fff004e030c,
evaluate=1, selfdict=0x0) at eval.c:8883
#21 0x000000000046ab2e in get_func_tv (name=0x1021ef0 "pchk#PChk",
len=9, rettv=0x7fff004e0310, arg=0x7fff004e0330,
firstline=5, lastline=5, doesrange=0x7fff004e030c, evaluate=1,
selfdict=0x0) at eval.c:8712
#22 0x0000000000462cfb in ex_call (eap=0x7fff004e0410) at eval.c:3533
#23 0x00000000004a36ef in do_one_cmd (cmdlinep=0x7fff004e0aa8,
sourcing=1, cstack=0x7fff004e0600, fgetline=
0x4ba15b <getexline>, cookie=0x0) at ex_docmd.c:2930
#24 0x00000000004a0439 in do_cmdline (cmdline=0x1061aa0 "call
pchk#PChk(s:Check,)", fgetline=0x4ba15b <getexline>, cookie=
0x0, flags=11) at ex_docmd.c:1116
---Type <return> to continue, or q <return> to quit---
#25 0x00000000004aa70f in do_ucmd (eap=0x7fff004e0c70) at ex_docmd.c:6742
#26 0x00000000004a36c3 in do_one_cmd (cmdlinep=0x7fff004e1308,
sourcing=0, cstack=0x7fff004e0e60, fgetline=
0x4ba15b <getexline>, cookie=0x0) at ex_docmd.c:2921
#27 0x00000000004a0439 in do_cmdline (cmdline=0x0, fgetline=0x4ba15b
<getexline>, cookie=0x0, flags=0) at ex_docmd.c:1116
#28 0x000000000053286b in nv_colon (cap=0x7fff004e1430) at normal.c:5335
#29 0x000000000052b0b7 in normal_cmd (oap=0x7fff004e1510, toplevel=1) at
normal.c:1159
#30 0x0000000000647a74 in main_loop (cmdwin=0, noexmode=0) at main.c:1345
#31 0x00000000006473b4 in main (argc=2, argv=0x7fff004e1828) at main.c:1044
(gdb) down
#2 0x00000000005f5e61 in ui_delay (msec=50, ignoreinput=1) at ui.c:251
251 mch_delay(msec, ignoreinput);
(gdb) p msec
$1 = 50
(gdb) p ignoreinput
$2 = 1
(gdb) down
#1 0x000000000055b5b0 in mch_delay (msec=50, ignoreinput=1) at
os_unix.c:638
638 (void)nanosleep(&ts, NULL);
(gdb) p ts
$4 = {tv_sec = 0, tv_nsec = 50000000}
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.