* What's the matter with "scm_string_p()"?
@ 2005-12-03 21:26 Bruce Korb
2005-12-03 23:26 ` Kevin Ryde
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Bruce Korb @ 2005-12-03 21:26 UTC (permalink / raw)
Hi Guys,
In trying to "upgrade" things and expunge the "gh_" interface, I
tried to use "scm_string_p()" as a replacement for "gh_string_p()".
That lead to an extraordinarily obtuse seg fault that was only
solved by using gh_string_p(), despite its being deprecated.
(Both would appropriately return #t or #f, but it seems that
scm_string_p() modified some underlying thing that triggered the
seg fault. The actual SCM value was 11124/0x2b74.)
Anybody with any guesses as to why? In the end, I am finding I
need to AG_SCM_WHATEVER() macro-wrap my usage of the Guile interface
so that I can upgrade for each version. 1.6.x mostly avoids the
gh_* stuff -- except for gh_string_p.
Just in case you-all wanted to know.
Regards, Bruce
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What's the matter with "scm_string_p()"?
2005-12-03 21:26 What's the matter with "scm_string_p()"? Bruce Korb
@ 2005-12-03 23:26 ` Kevin Ryde
2005-12-05 13:57 ` Han-Wen Nienhuys
[not found] ` <200512041615.15333.bkorb@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Kevin Ryde @ 2005-12-03 23:26 UTC (permalink / raw)
Cc: guile-devel
Bruce Korb <bkorb@gnu.org> writes:
>
> Anybody with any guesses as to why?
It'd have to be something pretty obscure, since gh_string_p is just
return scm_is_true (scm_string_p (val))
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What's the matter with "scm_string_p()"?
2005-12-03 21:26 What's the matter with "scm_string_p()"? Bruce Korb
2005-12-03 23:26 ` Kevin Ryde
@ 2005-12-05 13:57 ` Han-Wen Nienhuys
[not found] ` <200512041615.15333.bkorb@gnu.org>
2 siblings, 0 replies; 5+ messages in thread
From: Han-Wen Nienhuys @ 2005-12-05 13:57 UTC (permalink / raw)
Bruce Korb wrote:
> Hi Guys,
>
> In trying to "upgrade" things and expunge the "gh_" interface, I
> tried to use "scm_string_p()" as a replacement for "gh_string_p()".
you're looking for scm_is_string()
--
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What's the matter?
[not found] ` <87lkyzp4c0.fsf@zip.com.au>
@ 2005-12-05 23:51 ` Bruce Korb
2005-12-13 21:02 ` Marius Vollmer
0 siblings, 1 reply; 5+ messages in thread
From: Bruce Korb @ 2005-12-05 23:51 UTC (permalink / raw)
Cc: guile-devel
On Monday 05 December 2005 02:27 pm, you wrote:
> Bruce Korb <bkorb@gnu.org> writes:
> >
> > In particular, using "scm_makstr(_s, _ch)" causes faults,
>
> Looks like it ought to be ok. Post a failing example to guile-devel
> if you like.
Hi Kevin,
It turns out that in all places where I was using scm_makstr(), I was
also using SCM_CHARS to access the string memory and then fill it in.
It *must* be safe to do because I don't call any scheme functions before
I am done scribbling in the memory. Anyway, to be safer, I have removed
all use of SCM_CHARS and that made scm_makstr unusable so I am using a
new approach. I do not use scm_makstr anymore.
Since it takes a *LOT* of work to get autogen-5.7.2 to run under
Guile 1.7.x, I don't think it worth the bother to try to use that
as an example. If someone were to say, "I will work on the issue",
then I'll hack my autogen-5.8preXXX to use that function once again.
And fail. Otherwise, lets forget it.
Thanks for your help. Regards, Bruce
> Bruce Korb <bkorb@gnu.org> writes:
> >
> > I should be getting stack traces on Scheme errors. I'm not.
> > (And, yes, I invoke either ``(backtrace)'' or ``scm_backtrace()''
> > when a failure is detected.)
>
> I think I've been having trouble with backtraces not appearing too
> (just from plain scheme code) but I didn't know where to look for
> what's wrong.
Me, either. I did a bunch of grepping into the 1.4.1 and 1.6.7 source,
but nothing jumped out as the way it was accomplished. Black magic? :)
In the end, I've altered my test thus:
cat > ${testname}.samp6 <<EOF
${testname}.tpl6:7:4: In expression (stumble-over-unbound-variable):
${testname}.tpl6:7:4: Unbound variable: stumble-over-unbound-variable
Scheme evaluation error. AutoGen ABEND-ing in template
error.tpl6 on line 3
EOF
if test ${GUILE_VERSION} -gt 107000
then
echo "WARNING: Guile 1.7.x cannot display error line numbers" >&2
exec 3> ${testname}.samp6-tmp
echo 'ERROR: Unbound variable: stumble-over-unbound-variable' >&3
sed 1,2d ${testname}.samp6 >&3
exec 3>&-
mv -f ${testname}.samp6-tmp ${testname}.samp6
fi
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: What's the matter?
2005-12-05 23:51 ` What's the matter? Bruce Korb
@ 2005-12-13 21:02 ` Marius Vollmer
0 siblings, 0 replies; 5+ messages in thread
From: Marius Vollmer @ 2005-12-13 21:02 UTC (permalink / raw)
Cc: guile-devel
Bruce Korb <bkorb@gnu.org> writes:
> It turns out that in all places where I was using scm_makstr(), I
> was also using SCM_CHARS to access the string memory and then fill
> it in. It *must* be safe to do because I don't call any scheme
> functions before I am done scribbling in the memory.
I would like to reproduce this. Could you give me instructions for
how to do that?
What you describe _ought_ to work. If we can't get SCM_CHARS /
SCM_STRING_CHARS to work we might as well remove it.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-12-13 21:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-03 21:26 What's the matter with "scm_string_p()"? Bruce Korb
2005-12-03 23:26 ` Kevin Ryde
2005-12-05 13:57 ` Han-Wen Nienhuys
[not found] ` <200512041615.15333.bkorb@gnu.org>
[not found] ` <87lkyzp4c0.fsf@zip.com.au>
2005-12-05 23:51 ` What's the matter? Bruce Korb
2005-12-13 21:02 ` Marius Vollmer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).