Re: more on MT debugging

Pascal Bourguignon <[email protected]> Thu, 14 Feb 2019 01:13:59 +0100
Newsgroups gmane.lisp.clisp.devel
Message-ID <[email protected]>
--===============8370471368795619338==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_50A7589F-6651-49B8-9B25-BAA51DDD378C"


--Apple-Mail=_50A7589F-6651-49B8-9B25-BAA51DDD378C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On 14 Feb 2019, at 00:50, Don Cohen =
<[email protected]> wrote:
>=20
>=20
> I just followed the procedure described in the message sent to this=20
> list on 2018-09-20 with one addition:
> before the defun causing the segfault I trace every function in the
> hash table section of the hyperspec.
> (MAKE-HASH-TABLE HASH-TABLE-P HASH-TABLE-COUNT HASH-TABLE-REHASH-SIZE
> HASH-TABLE-REHASH-THRESHOLD HASH-TABLE-SIZE HASH-TABLE-TEST GETHASH =
REMHASH
> MAPHASH CLRHASH SXHASH WITH-HASH-TABLE-ITERATOR)
>=20
> None of these appear to be called when I do the defun and get the =
segfault.
>=20
> Does that show that this problem is unrelated to hashing or is there =
still
> some way hashing could be involved?

I=E2=80=99ve not looked at the hash table code, but in general for =
implementations written in C (eg. emacs lisp), you have to consider two =
levels: the lisp level at which CL:TRACE will work, and the C level.=20

That=E2=80=99s where the rules from 11.1.2.1.2 come into play =
http://www.lispworks.com/documentation/HyperSpec/Body/11_abab.htm =
<http://www.lispworks.com/documentation/HyperSpec/Body/11_abab.htm>=20

Specifically, any function in the CL package can be called internally =
thru other mechanisms than provided to the user code: the C code can =
call directly the C implementation of the CL functions, without passing =
thru the CL API. Hence TRACE is allowed NOT to work in those cases!  =
http://www.lispworks.com/documentation/HyperSpec/Body/m_tracec.htm#trace

Instead, you can use gdb to break on those C functions.

--=20
__Pascal J. Bourguignon__





--Apple-Mail=_50A7589F-6651-49B8-9B25-BAA51DDD378C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 14 Feb 2019, at 00:50, Don Cohen &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; =
wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D""><br class=3D"">I just followed the procedure described in the =
message sent to this <br class=3D"">list on 2018-09-20 with one =
addition:<br class=3D"">before the defun causing the segfault I trace =
every function in the<br class=3D"">hash table section of the =
hyperspec.<br class=3D"">(MAKE-HASH-TABLE HASH-TABLE-P HASH-TABLE-COUNT =
HASH-TABLE-REHASH-SIZE<br class=3D""> HASH-TABLE-REHASH-THRESHOLD =
HASH-TABLE-SIZE HASH-TABLE-TEST GETHASH REMHASH<br class=3D""> MAPHASH =
CLRHASH SXHASH WITH-HASH-TABLE-ITERATOR)<br class=3D""><br class=3D"">None=
 of these appear to be called when I do the defun and get the =
segfault.<br class=3D""><br class=3D"">Does that show that this problem =
is unrelated to hashing or is there still<br class=3D"">some way hashing =
could be involved?<br class=3D""></div></div></blockquote><br =
class=3D""></div><div>I=E2=80=99ve not looked at the hash table code, =
but in general for implementations written in C (eg. emacs lisp), you =
have to consider two levels: the lisp level at which CL:TRACE will work, =
and the C level.&nbsp;</div><div><br class=3D""></div><div>That=E2=80=99s =
where the rules from 11.1.2.1.2 come into play&nbsp;<a =
href=3D"http://www.lispworks.com/documentation/HyperSpec/Body/11_abab.htm"=
 =
class=3D"">http://www.lispworks.com/documentation/HyperSpec/Body/11_abab.h=
tm</a>&nbsp;</div><div><br class=3D""></div><div>Specifically, any =
function in the CL package can be called internally thru other =
mechanisms than provided to the user code: the C code can call directly =
the C implementation of the CL functions, without passing thru the CL =
API. Hence TRACE is allowed NOT to work in those cases! &nbsp;<a =
href=3D"http://www.lispworks.com/documentation/HyperSpec/Body/m_tracec.htm=
#trace" =
class=3D"">http://www.lispworks.com/documentation/HyperSpec/Body/m_tracec.=
htm#trace</a></div><div><br class=3D""></div><div>Instead, you can use =
gdb to break on those C functions.</div><br class=3D""><div class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D"">--&nbsp;<br class=3D"">__Pascal J. Bourguignon__</div><div =
style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><br class=3D""><br class=3D""><br class=3D""></div></div></div>=

</div>
<br class=3D""></body></html>=

--Apple-Mail=_50A7589F-6651-49B8-9B25-BAA51DDD378C--


--===============8370471368795619338==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============8370471368795619338==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
clisp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-devel

--===============8370471368795619338==--