]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r216806: sh: Properly restore exception handler in fc.
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 16 Jan 2011 22:10:18 +0000 (22:10 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 16 Jan 2011 22:10:18 +0000 (22:10 +0000)
commit56661a89961b59ffe6cf4498be1ac2dc8a75dee3
treeb228ebef02f72a17deed4a17160fd0221b04fcbd
parent35a4a78ed829cf63dc00d44b7cd9f1ef88c5f24d
MFC r216806: sh: Properly restore exception handler in fc.

If SIGINT arrived at exactly the right moment (unlikely), an exception
handler in a no longer active stack frame would be called.

Because the old handler was not used in the normal path, clang thought it
was a dead value and if an exception happened it would longjmp() to garbage.
This caused builtins/fc1.0 to fail if histedit.c was compiled with clang.
(Note: not tested on stable/8 with clang.)

git-svn-id: svn://svn.freebsd.org/base/stable/8@217485 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
bin/sh/histedit.c