unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12444: Emacs, a segmentation fault occurs when saving a file on a NFS partition.
@ 2012-09-14 15:54 Yves Baumes
  2012-09-14 16:38 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Yves Baumes @ 2012-09-14 15:54 UTC (permalink / raw)
  To: 12444

[-- Attachment #1: Type: text/plain, Size: 3639 bytes --]

This instance of emacs has been launched with "emacs -Q" and the
segmenation occurs the same way. Here is a backtrace of it:

#0  0x007af5f9 in free () from /lib/tls/libc.so.6
#1  0x00a4ee25 in freecon () from /lib/libselinux.so.1
#2  0x0813fcff in Ffile_selinux_context (filename=139528593) at
fileio.c:2846
#3  0x0817b138 in Ffuncall (nargs=2, args=0xbfffd7d8) at eval.c:3004
#4  0x081ada6a in exec_byte_code (bytestr=<value optimized out>,
vector=136620805, maxdepth=20, args_template=138402570, nargs=0, args=0x0)
at bytecode.c:785
#5  0x081ae1de in Fbyte_code (bytestr=136620777, vector=136620805,
maxdepth=20) at bytecode.c:423
#6  0x0817a277 in eval_sub (form=136620766) at eval.c:2352
#7  0x0817bfa1 in internal_lisp_condition_case (var=138402570,
bodyform=136620766, handlers=136621254) at eval.c:1468
#8  0x081accb9 in exec_byte_code (bytestr=<value optimized out>,
vector=136620661, maxdepth=24, args_template=138402570, nargs=0, args=0x0)
at bytecode.c:981
#9  0x0817aac7 in funcall_lambda (fun=136620613, nargs=0,
arg_vector=0xbfffdc34) at eval.c:3232
#10 0x0817af4f in Ffuncall (nargs=1, args=0xbfffdc30) at eval.c:3062
#11 0x081ada6a in exec_byte_code (bytestr=<value optimized out>,
vector=136625541, maxdepth=28, args_template=138402570, nargs=0, args=0x0)
at bytecode.c:785
#12 0x0817aac7 in funcall_lambda (fun=136625501, nargs=0,
arg_vector=0xbfffddc4) at eval.c:3232
#13 0x0817af4f in Ffuncall (nargs=1, args=0xbfffddc0) at eval.c:3062
#14 0x081ada6a in exec_byte_code (bytestr=<value optimized out>,
vector=136625373, maxdepth=12, args_template=138402570, nargs=0, args=0x0)
at bytecode.c:785
#15 0x0817aac7 in funcall_lambda (fun=136625333, nargs=0,
arg_vector=0xbfffdf44) at eval.c:3232
#16 0x0817af4f in Ffuncall (nargs=1, args=0xbfffdf40) at eval.c:3062
#17 0x081ada6a in exec_byte_code (bytestr=<value optimized out>,
vector=136624933, maxdepth=20, args_template=138402570, nargs=0, args=0x0)
at bytecode.c:785
#18 0x0817aac7 in funcall_lambda (fun=136624885, nargs=0,
arg_vector=0xbfffe0d4) at eval.c:3232
#19 0x0817af4f in Ffuncall (nargs=1, args=0xbfffe0d0) at eval.c:3062
#20 0x081ada6a in exec_byte_code (bytestr=<value optimized out>,
vector=136624509, maxdepth=16, args_template=138402570, nargs=0, args=0x0)
at bytecode.c:785
#21 0x0817aac7 in funcall_lambda (fun=136624461, nargs=1,
arg_vector=0xbfffe294) at eval.c:3232
#22 0x0817af4f in Ffuncall (nargs=2, args=0xbfffe290) at eval.c:3062
#23 0x081774c8 in Fcall_interactively (function=138869458,
record_flag=138402570, keys=138469605) at callint.c:852
#24 0x0817b10f in Ffuncall (nargs=4, args=0xbfffe420) at eval.c:3004
#25 0x0817b2a8 in call3 (fn=8874020, arg1=8874020, arg2=8874020,
arg3=8874020) at eval.c:2801
#26 0x08118835 in Fcommand_execute (cmd=138869458, record_flag=138402570,
keys=138402570, special=138402570) at keyboard.c:10330
#27 0x0811fef9 in command_loop_1 () at keyboard.c:1572
#28 0x081781da in internal_condition_case (bfun=0x811fbc4 <command_loop_1>,
handlers=138472482, hfun=0x8119038 <cmd_error>) at eval.c:1514
#29 0x08112fca in command_loop_2 (ignore=138402570) at keyboard.c:1160
#30 0x081780e9 in internal_catch (tag=138470434, func=0x8112fac
<command_loop_2>, arg=138402570) at eval.c:1271
#31 0x08112e81 in command_loop () at keyboard.c:1139
#32 recursive_edit_1 () at keyboard.c:759
#33 0x08112f97 in Frecursive_edit () at keyboard.c:823
#34 0x0811202c in main (argc=3, argv=0xbfffeb04) at emacs.c:1715
1 - I open a file located on a NFS partition. For instance my .emacs.
2 - I try to modify it. Then I save it (C-x C-s).
3 - Segfault.

Same scenario on a local hard drive does not lead to a segfault.

Regards
Yves

[-- Attachment #2: Type: text/html, Size: 3995 bytes --]

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

* bug#12444: Emacs, a segmentation fault occurs when saving a file on a NFS partition.
  2012-09-14 15:54 bug#12444: Emacs, a segmentation fault occurs when saving a file on a NFS partition Yves Baumes
@ 2012-09-14 16:38 ` Andreas Schwab
  2012-09-14 16:55   ` Yves Baumes
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2012-09-14 16:38 UTC (permalink / raw)
  To: Yves Baumes; +Cc: 12444-done

Fixed in emacs-24.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#12444: Emacs, a segmentation fault occurs when saving a file on a NFS partition.
  2012-09-14 16:38 ` Andreas Schwab
@ 2012-09-14 16:55   ` Yves Baumes
  2012-09-14 17:03     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Yves Baumes @ 2012-09-14 16:55 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 12444-done

Hi Andreas,

the bug occurred with emacs-24.2, fetch from the gnu's ftp. Do you mean it is fixed on the cvs repository?

Regards
Yves

Le 14 sept. 2012 à 18:38, Andreas Schwab a écrit :

> Fixed in emacs-24.
> 
> Andreas.
> 
> -- 
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."






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

* bug#12444: Emacs, a segmentation fault occurs when saving a file on a NFS partition.
  2012-09-14 16:55   ` Yves Baumes
@ 2012-09-14 17:03     ` Eli Zaretskii
  2012-09-14 17:56       ` Yves Baumes
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2012-09-14 17:03 UTC (permalink / raw)
  To: Yves Baumes; +Cc: 12444-done, schwab

> From: Yves Baumes <ybaumes@gmail.com>
> Date: Fri, 14 Sep 2012 18:55:45 +0200
> Cc: 12444-done@debbugs.gnu.org
> 
> the bug occurred with emacs-24.2, fetch from the gnu's ftp. Do you mean it is fixed on the cvs repository?

In bzr, not in CVS.  Here's the patch committed by Andreas:

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2012-09-12 17:18:33 +0000
+++ src/ChangeLog	2012-09-14 16:35:25 +0000
@@ -1,3 +1,9 @@
+2012-09-14  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* fileio.c (Ffile_selinux_context): Only call freecon when
+	lgetfilecon succeeded.
+	(Fset_file_selinux_context): Likewise.  (Bug#12444)
+
 2012-09-12  Eli Zaretskii  <eliz@gnu.org>
 
 	* xdisp.c (try_window_reusing_current_matrix): Under bidi

=== modified file 'src/fileio.c'
--- src/fileio.c	2012-07-14 10:46:56 +0000
+++ src/fileio.c	2012-09-14 16:35:25 +0000
@@ -2841,9 +2841,8 @@ or if SELinux is disabled, or if Emacs l
 	  if (context_range_get (context))
 	    values[3] = build_string (context_range_get (context));
 	  context_free (context);
+	  freecon (con);
 	}
-      if (con)
-	freecon (con);
     }
 #endif
 
@@ -2920,12 +2919,10 @@ compiled with SELinux support.  */)
 	    report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
 
 	  context_free (parsed_con);
+	  freecon (con);
 	}
       else
 	report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil));
-
-      if (con)
-	freecon (con);
     }
 #endif
 






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

* bug#12444: Emacs, a segmentation fault occurs when saving a file on a NFS partition.
  2012-09-14 17:03     ` Eli Zaretskii
@ 2012-09-14 17:56       ` Yves Baumes
  0 siblings, 0 replies; 5+ messages in thread
From: Yves Baumes @ 2012-09-14 17:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 12444-done, schwab

Thank you. :-)

Le 14 sept. 2012 à 19:03, Eli Zaretskii a écrit :

>> From: Yves Baumes <ybaumes@gmail.com>
>> Date: Fri, 14 Sep 2012 18:55:45 +0200
>> Cc: 12444-done@debbugs.gnu.org
>> 
>> the bug occurred with emacs-24.2, fetch from the gnu's ftp. Do you mean it is fixed on the cvs repository?
> 
> In bzr, not in CVS.  Here's the patch committed by Andreas:
> 
> === modified file 'src/ChangeLog'
> --- src/ChangeLog	2012-09-12 17:18:33 +0000
> +++ src/ChangeLog	2012-09-14 16:35:25 +0000
> @@ -1,3 +1,9 @@
> +2012-09-14  Andreas Schwab  <schwab@linux-m68k.org>
> +
> +	* fileio.c (Ffile_selinux_context): Only call freecon when
> +	lgetfilecon succeeded.
> +	(Fset_file_selinux_context): Likewise.  (Bug#12444)
> +
> 2012-09-12  Eli Zaretskii  <eliz@gnu.org>
> 
> 	* xdisp.c (try_window_reusing_current_matrix): Under bidi
> 
> === modified file 'src/fileio.c'
> --- src/fileio.c	2012-07-14 10:46:56 +0000
> +++ src/fileio.c	2012-09-14 16:35:25 +0000
> @@ -2841,9 +2841,8 @@ or if SELinux is disabled, or if Emacs l
> 	  if (context_range_get (context))
> 	    values[3] = build_string (context_range_get (context));
> 	  context_free (context);
> +	  freecon (con);
> 	}
> -      if (con)
> -	freecon (con);
>     }
> #endif
> 
> @@ -2920,12 +2919,10 @@ compiled with SELinux support.  */)
> 	    report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
> 
> 	  context_free (parsed_con);
> +	  freecon (con);
> 	}
>       else
> 	report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil));
> -
> -      if (con)
> -	freecon (con);
>     }
> #endif
> 
> 






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

end of thread, other threads:[~2012-09-14 17:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-14 15:54 bug#12444: Emacs, a segmentation fault occurs when saving a file on a NFS partition Yves Baumes
2012-09-14 16:38 ` Andreas Schwab
2012-09-14 16:55   ` Yves Baumes
2012-09-14 17:03     ` Eli Zaretskii
2012-09-14 17:56       ` Yves Baumes

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