Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/arch/i386/stand/dosboot

Module Name:    src
Committed By:   rin
Date:           Mon Nov  6 06:53:52 UTC 2023

Modified Files:
        src/sys/arch/i386/stand/dosboot: Makefile

Log Message:
x86/dosboot: Allow NULL dereference to fetch command line arguments

DOS command line arguments are provided as struct psp at 0x0000;
see doscommain.c.

Recent versions of gcc and clang are clever enough to optimize code
block involving NULL dereference into ud2 insn.

Sprinkle -fno-delete-null-pointer-checks to doscommain.c to
prevent this behavior.

Note that for netbsd-9 and later was broken due to
this ``over optimization''. gcc 5.5.0 and clang 4.0.0 in netbsd-8
generate correct codes without this workaround.

Are there still use cases for Does anyone want to
boot NetBSD from real-mode DOS in 2023?

To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/i386/stand/dosboot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index