-
Bug
-
Resolution: Fixed
-
P4
-
11
-
b03
-
aix
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8228896 | 13.0.2 | Steve Groeger | P4 | Resolved | Fixed | b01 |
JDK-8229088 | 13.0.1 | Steve Groeger | P4 | Resolved | Fixed | b05 |
JDK-8228895 | 11.0.5 | Steve Groeger | P4 | Resolved | Fixed | b02 |
There is a scenario where in a Java program after loading some shared
libraries (using System.loadLibrary) and then calling
javax.imageio.ImageIO.read(new File(..)) the java program displays the
following error message:
loadquery failed (12 Not enough space)
This happens when running on AIX with Java 11 using this sample code:
import java.io.File;
import java.util.Map;
import javax.imageio.ImageIO;
public class Reproduce {
public static void main(String[] args) {
try {
System.loadLibrary("mylib");
String filePath = "...";
BufferedImage img = ImageIO.read(new File(filePath));
}
catch (Throwable e) {
System.out.println("Exception : " + e);
e.printStackTrace();
}
}
}
It seems that this is displayed from
src/java.desktop/aix/native/libawt/porting_aix.c
static unsigned char dladdr_buffer[0x4000];
static void fill_dll_info(void) {
int rc = loadquery(L_GETINFO,dladdr_buffer, sizeof(dladdr_buffer));
if (rc == -1) {
fprintf(stderr, "loadquery failed (%d %s)", errno, strerror(errno));
fflush(stderr);
}
}
and is due to the dladdr_info buffer being too small to contain all the
data returned from the loadquery function.
The same buffer size is also used in
src/java.base/aix/native/libjli/java_md_aix.c
libraries (using System.loadLibrary) and then calling
javax.imageio.ImageIO.read(new File(..)) the java program displays the
following error message:
loadquery failed (12 Not enough space)
This happens when running on AIX with Java 11 using this sample code:
import java.io.File;
import java.util.Map;
import javax.imageio.ImageIO;
public class Reproduce {
public static void main(String[] args) {
try {
System.loadLibrary("mylib");
String filePath = "...";
BufferedImage img = ImageIO.read(new File(filePath));
}
catch (Throwable e) {
System.out.println("Exception : " + e);
e.printStackTrace();
}
}
}
It seems that this is displayed from
src/java.desktop/aix/native/libawt/porting_aix.c
static unsigned char dladdr_buffer[0x4000];
static void fill_dll_info(void) {
int rc = loadquery(L_GETINFO,dladdr_buffer, sizeof(dladdr_buffer));
if (rc == -1) {
fprintf(stderr, "loadquery failed (%d %s)", errno, strerror(errno));
fflush(stderr);
}
}
and is due to the dladdr_info buffer being too small to contain all the
data returned from the loadquery function.
The same buffer size is also used in
src/java.base/aix/native/libjli/java_md_aix.c
- backported by
-
JDK-8228895 [aix] loadquery failed error reported
- Resolved
-
JDK-8228896 [aix] loadquery failed error reported
- Resolved
-
JDK-8229088 [aix] loadquery failed error reported
- Resolved