unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [bug #22369] goops: segmentation fault in scm_add_slot
@ 2008-02-20 12:51 anonymous
  2008-02-21  8:35 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: anonymous @ 2008-02-20 12:51 UTC (permalink / raw)
  To: bug-guile


URL:
  <http://savannah.gnu.org/bugs/?22369>

                 Summary: goops: segmentation fault in scm_add_slot 
                 Project: Guile
            Submitted by: None
            Submitted on: Wednesday 02/20/2008 at 12:51 UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

There is a bug in goops.c:2873 in function scm_add_slot() that causes a
reproducible segmentation fault.

SCM gns = scm_list_n (name, SCM_BOOL_F, get, set, n, scm_from_int (1));

This call to scm_list_n is missing a terminating SCM_UNDEFINED and thus will
crash the program at runtime.
A patch to fix this behavior is attached.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wednesday 02/20/2008 at 12:51 UTC  Name:
guile-1.8.3_fix_scm_add_slot.diff  Size: 644B   By: None
Took me two days debugging my own code before I realized that it was not even
my fault.. :(
<http://savannah.gnu.org/bugs/download.php?file_id=15082>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22369>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [bug #22369] goops: segmentation fault in scm_add_slot
  2008-02-20 12:51 [bug #22369] goops: segmentation fault in scm_add_slot anonymous
@ 2008-02-21  8:35 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2008-02-21  8:35 UTC (permalink / raw)
  To: Ludovic Courtès, Rene Koecher, bug-guile


Update of bug #22369 (project guile):

             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Thanks for finding it out!  It's now fixed in CVS, will be in 1.8.5.

Actually, `scm_add_slot ()' is not used internally, which is the bug wasn't
caught earlier.

Too bad we can't use GCC's `sentinel' attribute for that purpose.

Thanks,
Ludovic.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22369>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-21  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-20 12:51 [bug #22369] goops: segmentation fault in scm_add_slot anonymous
2008-02-21  8:35 ` Ludovic Courtès

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).