8218811: replace open by os::open in hotspot coding - was : open-calls in hotspot code instead of os::open ?

Baesken, Matthias matthias.baesken at sap.com
Tue Feb 12 09:17:15 UTC 2019


Hi  Ioi / Kim  I created 

https://bugs.openjdk.java.net/browse/JDK-8218811

8218811:  replace open by os::open in hotspot coding

> 
> Not yet, but see https://bugs.openjdk.java.net/browse/JDK-8214976
>

Regarding     https://bugs.openjdk.java.net/browse/JDK-8214976  


> For functions which should never be called outside the implementation of the os replacement, we can use (for example) 
>
> extern "C" int vsnprintf(char*, size_t, const char*, va_list) 
> __attribute__((__deprecated__("use os::vsnprintf"))); 
>
> and in the definition of os::vsnprintf, locally disable the deprecation warning with the appropriate diagnostic #pragma.

Should I add something like this for open   to  compilerWarnings.hpp  ?
I think if yes, I better restrict this for now to gcc  .


Best regards, Matthias

> 
> Message: 4
> Date: Thu, 7 Feb 2019 12:40:00 -0500
> From: Kim Barrett <kim.barrett at oracle.com>
> To: Ioi Lam <ioi.lam at oracle.com>
> Cc: hotspot-dev developers <hotspot-dev at openjdk.java.net>
> Subject: Re: open-calls in hotspot code instead of os::open ?
> Message-ID: <0FD37FD4-A478-4849-B474-A3A8CDCDD6D5 at oracle.com>
> Content-Type: text/plain; charset=us-ascii
> 
> > On Feb 6, 2019, at 9:08 AM, Ioi Lam <ioi.lam at oracle.com> wrote:
> >
> > I think this should be fixed.
> 
> +1
> 
> > BTW, is there a way to forbid all the calls to ::open()?
> 
> Not yet, but see https://bugs.openjdk.java.net/browse/JDK-8214976
> 
> 



More information about the hotspot-dev mailing list