mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
gcc knows that savectx() is potentially a setjmp style dual-return
function which may lead to stack lossage and clobbered variables. This isn't the case here, but there is no way to tell gcc that. Work around this in a kinda bizzare way, but it shuts gcc up.
This commit is contained in:
parent
96b2a9d400
commit
87de370376
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65394
@ -304,13 +304,8 @@ boot(howto)
|
||||
*/
|
||||
EVENTHANDLER_INVOKE(shutdown_post_sync, howto);
|
||||
splhigh();
|
||||
if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold) {
|
||||
savectx(&dumppcb);
|
||||
#ifdef __i386__
|
||||
dumppcb.pcb_cr3 = rcr3();
|
||||
#endif
|
||||
if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold)
|
||||
dumpsys();
|
||||
}
|
||||
|
||||
/* Now that we're going to really halt the system... */
|
||||
EVENTHANDLER_INVOKE(shutdown_final, howto);
|
||||
@ -470,6 +465,10 @@ dumpsys(void)
|
||||
int error;
|
||||
static int dumping;
|
||||
|
||||
savectx(&dumppcb);
|
||||
#ifdef __i386__
|
||||
dumppcb.pcb_cr3 = rcr3();
|
||||
#endif
|
||||
if (dumping++) {
|
||||
printf("Dump already in progress, bailing...\n");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user