unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Invalid use of Fmember in sigchld_handler
@ 2007-03-12 16:04 Andreas Schwab
  2007-03-12 17:08 ` Kim F. Storm
  2007-03-12 19:26 ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Schwab @ 2007-03-12 16:04 UTC (permalink / raw)
  To: emacs-devel

In sigchld_handler Fmember is used to find entries in deleted_pid_list,
but Fmember does not know about mark bits.  Moreover, make_fixnum_or_float
can call malloc, which is also forbidden here.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Invalid use of Fmember in sigchld_handler
  2007-03-12 16:04 Invalid use of Fmember in sigchld_handler Andreas Schwab
@ 2007-03-12 17:08 ` Kim F. Storm
  2007-03-13  2:44   ` Richard Stallman
  2007-03-12 19:26 ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Kim F. Storm @ 2007-03-12 17:08 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel

Andreas Schwab <schwab@suse.de> writes:

> In sigchld_handler Fmember is used to find entries in deleted_pid_list,
> but Fmember does not know about mark bits.  Moreover, make_fixnum_or_float
> can call malloc, which is also forbidden here.

.. and local var `pid' must be pid_t rather than EMACS_INT.

Thank you for proof-reading this code!!

I have installed a fix.  Please take a look!

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Invalid use of Fmember in sigchld_handler
  2007-03-12 16:04 Invalid use of Fmember in sigchld_handler Andreas Schwab
  2007-03-12 17:08 ` Kim F. Storm
@ 2007-03-12 19:26 ` Stefan Monnier
  2007-03-12 21:32   ` Kim F. Storm
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2007-03-12 19:26 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel

> In sigchld_handler Fmember is used to find entries in deleted_pid_list,
> but Fmember does not know about mark bits.

>From lisp.h:

   #ifndef XGCTYPE
   /* The distinction does not exist now that the MARKBIT has been eliminated.  */
   #define XGCTYPE(a) XTYPE (a)
   #endif

The GC_foo macros shouldn't matter any more.  I haven't removed them yet,
because when I installed my "remove markbits" patch I wanted to keep changes
to a minimum to ease acceptance, debugging, and maintenance, and afterwards
it seemed too close to the release.


        Stefan


PS: But of course the make_fixnum_or_float call was problematic, so this
remark doesn't make any difference w.r.t the patch that Kim installed.

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

* Re: Invalid use of Fmember in sigchld_handler
  2007-03-12 19:26 ` Stefan Monnier
@ 2007-03-12 21:32   ` Kim F. Storm
  2007-03-13  1:30     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Kim F. Storm @ 2007-03-12 21:32 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Andreas Schwab, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> In sigchld_handler Fmember is used to find entries in deleted_pid_list,
>> but Fmember does not know about mark bits.
>
>>From lisp.h:
>
>    #ifndef XGCTYPE
>    /* The distinction does not exist now that the MARKBIT has been eliminated.  */
>    #define XGCTYPE(a) XTYPE (a)
>    #endif

That #ifndef seems to indicate that there are cases where GC_ does matter.
At least, it isn't obvious that some other definition of XGCTYPE cannot exist...

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Invalid use of Fmember in sigchld_handler
  2007-03-12 21:32   ` Kim F. Storm
@ 2007-03-13  1:30     ` Stefan Monnier
  2007-03-13  3:01       ` Miles Bader
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2007-03-13  1:30 UTC (permalink / raw)
  To: Kim F. Storm; +Cc: Andreas Schwab, emacs-devel

>>> In sigchld_handler Fmember is used to find entries in deleted_pid_list,
>>> but Fmember does not know about mark bits.
>> 
>>> From lisp.h:
>> 
>> #ifndef XGCTYPE
>> /* The distinction does not exist now that the MARKBIT has been eliminated.  */
>> #define XGCTYPE(a) XTYPE (a)
>> #endif

> That #ifndef seems to indicate that there are cases where GC_ does matter.
> At least, it isn't obvious that some other definition of XGCTYPE cannot exist...

"grep XGCTYPE" indicates it's not defined anywhere else.


        Stefan

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

* Re: Invalid use of Fmember in sigchld_handler
  2007-03-12 17:08 ` Kim F. Storm
@ 2007-03-13  2:44   ` Richard Stallman
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2007-03-13  2:44 UTC (permalink / raw)
  To: Kim F. Storm; +Cc: schwab, emacs-devel

Thanks for fixing this so fast.

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

* Re: Invalid use of Fmember in sigchld_handler
  2007-03-13  1:30     ` Stefan Monnier
@ 2007-03-13  3:01       ` Miles Bader
  2007-03-13  3:43         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Miles Bader @ 2007-03-13  3:01 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> That #ifndef seems to indicate that there are cases where GC_ does
>> matter.  At least, it isn't obvious that some other definition of
>> XGCTYPE cannot exist...
>
> "grep XGCTYPE" indicates it's not defined anywhere else.

It does seem like it would document the situation better if the
definition were simply made unconditional.

-Miles

-- 
.Numeric stability is probably not all that important when you're guessing.

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

* Re: Invalid use of Fmember in sigchld_handler
  2007-03-13  3:01       ` Miles Bader
@ 2007-03-13  3:43         ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2007-03-13  3:43 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

>>> That #ifndef seems to indicate that there are cases where GC_ does
>>> matter.  At least, it isn't obvious that some other definition of
>>> XGCTYPE cannot exist...
>> 
>> "grep XGCTYPE" indicates it's not defined anywhere else.

> It does seem like it would document the situation better if the
> definition were simply made unconditional.

Go ahead and cleanup now if you want.
Me, I never know where to stop, so I'd rather wait post-22 when it can be
done much more calmly.


        Stefan

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

end of thread, other threads:[~2007-03-13  3:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-12 16:04 Invalid use of Fmember in sigchld_handler Andreas Schwab
2007-03-12 17:08 ` Kim F. Storm
2007-03-13  2:44   ` Richard Stallman
2007-03-12 19:26 ` Stefan Monnier
2007-03-12 21:32   ` Kim F. Storm
2007-03-13  1:30     ` Stefan Monnier
2007-03-13  3:01       ` Miles Bader
2007-03-13  3:43         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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