Page MenuHomeFreeBSD

Fix comment parsing in interp_simple.c
ClosedPublic

Authored by bcran on Jun 1 2019, 4:10 AM.
Tags
None
Referenced Files
F148164851: D20491.diff
Mon, Mar 16, 5:20 AM
F148124447: D20491.diff
Sun, Mar 15, 11:17 PM
Unknown Object (File)
Sat, Mar 14, 1:28 AM
Unknown Object (File)
Tue, Mar 10, 6:06 PM
Unknown Object (File)
Tue, Mar 10, 2:01 PM
Unknown Object (File)
Thu, Feb 26, 2:53 AM
Unknown Object (File)
Feb 7 2026, 9:36 PM
Unknown Object (File)
Feb 7 2026, 4:08 PM
Subscribers
None

Details

Summary

loader.rc has comment lines without a trailing space, which get
interpreted as commands. Avoid this by only matching against the
backslash character.

Test Plan

Without the change, the following happens if bootx64.efi is loader_simp.efi

Trying: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)/HD(2,MBR,0x90909090,0x10419,0xB6E90)
Setting currdev to disk0p2:
> \
\: unknown command

/boot/kernel/kernel text=0x16a8a85 data=0x1c88f8+0x8191f8 syms=[0x8+0x17fe20+0x8+0x19ccce]

With the change, the loader gets further until failing, reporting an unknown
command "only" from the line "only forth definition" in e.g. stand/forth/loader.4th

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jun 1 2019, 4:15 AM
This revision was automatically updated to reflect the committed changes.