Bug 238928 - sys/jail.h isn't C++ safe
Summary: sys/jail.h isn't C++ safe
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-jail mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-01 16:00 UTC by Yuri Victorovich
Modified: 2019-07-04 10:36 UTC (History)
1 user (show)

See Also:


Attachments
jail.cpp (110 bytes, text/plain)
2019-07-01 16:02 UTC, Yuri Victorovich
no flags Details
stat.cpp (72 bytes, text/plain)
2019-07-01 16:02 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2019-07-01 16:00:31 UTC
Attaching C++ testcases jail.cpp and stat.cpp

> $ c++ -c jail.cpp && nm jail.o | grep jail
>                  U _Z4jailP4jail

> $ c++ -c stat.cpp && nm stat.o | grep stat
>                  U stat


jail call is compiled into a symbol as if it us a C++ function, which it is not, and the stat call is compiled fine.
Comment 1 Yuri Victorovich freebsd_committer 2019-07-01 16:02:01 UTC
Created attachment 205469 [details]
jail.cpp
Comment 2 Yuri Victorovich freebsd_committer 2019-07-01 16:02:19 UTC
Created attachment 205470 [details]
stat.cpp