Skip to content

Commit e4f9d6d

Browse files
committed
Address some docs correction requests.
1 parent 0c2731c commit e4f9d6d

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

docs/reference-manual/native-image/Compatibility.md

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ Mostly all Native Image features are supported on Linux AArch64 architecture, ex
111111

112112
* `-R:[+|-]WriteableCodeCache`: must be disabled.
113113
* `--libc=<value>`: `musl` is not supported.
114-
* `--gc=<value>`: The G1 garbage collector (`G1`) is not supported.
115114

116115
Find a list of options for the `native-image` builder [here](BuildOptions.md).
117116

docs/reference-manual/native-image/InspectTool.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The Native Image Inspect Tool can extract the compressed SBOM using the optional
1919

2020
## Extracting Class-Level Metadata (Deprecated)
2121

22-
> The extraction of class-level metadata using `native-image-inspect` is deprecated. In GraalVM for JDK 24, a deprecation warning is printed to `stderr`, and this functionality will be removed in GraalVM for JDK 25. Please migrate to using [class-level SBOMs](../../security/native-image.md#including-class-level-metadata-in-the-sbom) instead by passing `--enable-sbom=class-level,export` to the `native-image` builder, which generates an SBOM containing the same kind of class-level metadata information.
22+
> The extraction of class-level metadata using `native-image-inspect` is deprecated. In GraalVM for JDK 24, a deprecation warning is printed to `stderr`, and this functionality will be removed in GraalVM for JDK 25. Please migrate to using [class-level SBOMs](../../security/SBOM.md#including-class-level-metadata-in-the-sbom) instead by passing `--enable-sbom=class-level,export` to the `native-image` builder, which generates an SBOM containing the same kind of class-level metadata information.
2323
2424
Native Image provides the Inspect Tool to list all classes, fields, and methods included in a native executable or a native shared library.
2525
Run the command `$JAVA_HOME/bin/native-image-inspect <path_to_binary>` to list classes, methods, fields, and constructors in the JSON format that validates against the JSON schema defined in [`native-image-inspect-schema-v0.2.0.json`](assets/native-image-inspect-schema-v0.2.0.json) (only available in Oracle GraalVM).

docs/reference-manual/native-image/guides/include-resources.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,14 @@ To see which resources were included in your native executable, pass the option
9595
It generates an HTML file that can be examined with a regular web browser.
9696
The information about all included resources will be under the **Resources** tab.
9797

98-
In this demo the path to the resource file is straightforward, but it may be more complex in real-world use cases.
99-
Resources are specified via globs.
100-
For more advanced use-cases, you can register resources using the API methods (see [class RuntimeResourceAccess](https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/hosted/RuntimeResourceAccess.html)).
101-
Learn more about specifying a resource path using a glob and some syntax rules to be observed in [Accessing Resources in Native Image](../ReachabilityMetadata.md#resources).
98+
In this demo the path to the resource file is straightforward, but it may be more complex in a real-world use case.
99+
A resource or resource bundle may come from a module.
100+
Learn more how to specify it in [Resources in Java Modules](../ReachabilityMetadata.md#resources-in-java-modules).
101+
102+
For more advanced use-cases, you can register resources using the API methods (see [class RuntimeResourceAccess](https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/hosted/RuntimeResourceAccess.html)).
103+
Learn more about specifying a resource path using a glob and some syntax rules to be observed from [Accessing Resources in Native Image](../ReachabilityMetadata.md#resources).
102104

103105
### Related Documentation
104106

105107
* [Accessing Resources in Native Image](../ReachabilityMetadata.md#resources)
106-
* [Resource Metadata in JSON](../ReachabilityMetadata.md#resource-metadata-in-json)
108+
* [Resource Metadata in JSON](../ReachabilityMetadata.md#resource-metadata-in-json)

docs/security/polyglot-sandbox.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The CONSTRAINED policy:
5858
* Disallows [environment access](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/Context.Builder.html#allowEnvironmentAccess-org.graalvm.polyglot.EnvironmentAccess-).
5959
* Restricts host access:
6060
* Disallows [host class loading](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/Context.Builder.html#allowHostClassLoading-boolean-).
61-
* Disallows [to all public host classes and methods by default](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowPublicAccess-boolean-).
61+
* Disallows [access to all public host classes and methods by default](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowPublicAccess-boolean-).
6262
* Disallows [access inheritance](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowAccessInheritance-boolean-).
6363
* Disallows implementation of arbitrary host [classes](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowAllClassImplementations-boolean-) and [interfaces](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/HostAccess.Builder.html#allowAllImplementations-boolean-).
6464
* Disallows implementation of `java.lang.FunctionalInterface`.
@@ -109,7 +109,7 @@ Isolated versions of the languages can be downloaded from Maven using the follow
109109
<dependency>
110110
<groupId>org.graalvm.polyglot</groupId>
111111
<artifactId>js-isolate</artifactId>
112-
<version>${graalvm.version}</version>
112+
<version>${graalvm.polyglot.version}</version>
113113
<type>pom</type>
114114
</dependency>
115115
```
@@ -233,7 +233,7 @@ Certain limits can be [reset](#resetting-resource-limits) at any point of time d
233233

234234
The `sandbox.MaxCPUTime` option allows you to specify the maximum CPU time spent running guest code.
235235
CPU time spent depends on the underlying hardware.
236-
The maximum [CPU time](https://docs.oracle.com/en/java/javase/22/docs/api/java.management/java/lang/management/ThreadMXBean.html#getThreadCpuTime\(long\)) specifies how long a context can be active until it is automatically cancelled and the context is closed.
236+
The maximum [CPU time](https://docs.oracle.com/en/java/javase/23/docs/api/java.management/java/lang/management/ThreadMXBean.html#getThreadCpuTime\(long\)) specifies how long a context can be active until it is automatically cancelled and the context is closed.
237237
By default the time limit is checked every 10 milliseconds.
238238
This can be customized using the `sandbox.MaxCPUTimeCheckInterval` option.
239239

@@ -343,7 +343,7 @@ try (Context context = Context.newBuilder("js")
343343
}
344344
```
345345

346-
The limit is checked by retained size computation triggered either based on [allocated](https://docs.oracle.com/en/java/javase/22/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) bytes or on [low memory notification](https://docs.oracle.com/en/java/javase/22/docs/api/java.management/java/lang/management/MemoryMXBean.html).
346+
The limit is checked by retained size computation triggered either based on [allocated](https://docs.oracle.com/en/java/javase/23/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) bytes or on [low memory notification](https://docs.oracle.com/en/java/javase/23/docs/api/java.management/java/lang/management/MemoryMXBean.html).
347347

348348
The allocated bytes are checked by a separate high-priority thread that will be woken regularly.
349349
There is one such thread for each memory-limited context (one with `sandbox.MaxHeapMemory` set).
@@ -360,7 +360,7 @@ Retained size computation for a context can be customized using the expert optio
360360

361361
Retained size computation for a context is triggered when a retained bytes estimate exceeds a certain factor of specified `sandbox.MaxHeapMemory`.
362362
The estimate is based on heap memory
363-
[allocated](https://docs.oracle.com/en/java/javase/22/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) by threads where the context has been active.
363+
[allocated](https://docs.oracle.com/en/java/javase/23/docs/api/jdk.management/com/sun/management/ThreadMXBean.html#getThreadAllocatedBytes\(long\)) by threads where the context has been active.
364364
More precisely, the estimate is the result of previous retained bytes computation, if available, plus bytes allocated since the start of the previous computation.
365365
By default the factor of `sandbox.MaxHeapMemory` is 1.0 and it can be customized by the `sandbox.AllocatedBytesCheckFactor` option.
366366
The factor must be positive.
@@ -377,7 +377,7 @@ This can be configured by the `sandbox.RetainedBytesCheckInterval` option. The i
377377
The allocated bytes checking for a context can be disabled by the `sandbox.AllocatedBytesCheckEnabled` option.
378378
By default it is enabled ("true"). If disabled ("false"), retained size checking for the context can be triggered only by the low memory trigger.
379379

380-
When the total number of bytes allocated in the heap for the whole host VM exceeds a certain factor of the total heap memory of the VM, [low memory notification](https://docs.oracle.com/en/java/javase/22/docs/api/java.management/java/lang/management/MemoryMXBean.html) is invoked and initiates the following process.
380+
When the total number of bytes allocated in the heap for the whole host VM exceeds a certain factor of the total heap memory of the VM, [low memory notification](https://docs.oracle.com/en/java/javase/23/docs/api/java.management/java/lang/management/MemoryMXBean.html) is invoked and initiates the following process.
381381
The execution pauses for all execution contexts where the `sandbox.MaxHeapMemory` option is set. The execution is resumed only when retained bytes in the heap for each memory-limited context are computed and contexts exceeding their limits are cancelled.
382382
The default factor is 0.7. This can be configured by the `sandbox.RetainedBytesCheckFactor` option.
383383
The factor must be between 0.0 and 1.0. All contexts using the `sandbox.MaxHeapMemory` option must use the same value for `sandbox.RetainedBytesCheckFactor`.

docs/security/security-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ In managed mode, all access to unmanaged code including the operating system is
5858
* Regarding type safety, it is not possible to reinterpret a data pointer into a function pointer and execute arbitrary instructions (since these are distinct pointer types for LLVM runtime).
5959
* System calls are intercepted and routed to the corresponding Truffle APIs. For example, file IO is mapped to the Truffle `FileSystem` API.
6060
The set of currently supported system calls is very limited&mdash;only syscalls that can safely be mapped to the Truffle API level are available. Since LLVM Runtime in managed mode always runs bitcode compiled for Linux/x86, it only needs to implement system calls for this platform.
61-
* All dependent libraries are executed in managed mode as well, removing all references to natively executed system libraries. This includes libraries that are provided by the LLVM Runtime, such as muslibc.
61+
* All dependent libraries are executed in managed mode as well, removing all references to natively executed system libraries. This includes libraries that are provided by the LLVM Runtime, such as `muslibc`.
6262

6363
Managed mode can be selected when creating a context `(Context.create())` or when calling the `bin/lli` binary by specifying the `--llvm.managed` option. A "managed" context will adhere to any restrictions (for example, `allowIO`) passed during context creation and does not need the `allowNativeAccess` privilege.
6464

0 commit comments

Comments
 (0)