dlopen ignores RTLD_GLOBAL when reopening an RTLD_LOCAL library
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
The report provides a minimal reproducer in test.c and commands to build and run it with Emscripten and Node. First trace how dlopen handles reopening a local library with RTLD_GLOBAL, then compare dlsym(RTLD_DEFAULT, "answer") with the reproducer’s expected result. Done means the global lookup returns 42 on both wasm32 and wasm64.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Reopening an RTLD_LOCAL library with RTLD_GLOBAL succeeds, but its symbols remain unavailable through RTLD_DEFAULT.
Reproduced with Emscripten 6.0.8 on both wasm32 and wasm64.
cat > test.c <<'EOF'
#ifdef BUILD_PROVIDER
int answer_value = 42;
int answer(void) { return answer_value; }
#else
#include <assert.h>
#include <dlfcn.h>
#include <stdio.h>
int main(void) {
void *handle = dlopen("./provider.so", RTLD_NOW | RTLD_LOCAL);
assert(handle);
int (*answer_fn)(void) = dlsym(handle, "answer");
assert(answer_fn && answer_fn() == 42);
puts("Handle-specific lookup: 42");
assert(dlopen("./provider.so", RTLD_NOW | RTLD_GLOBAL) == handle);
dlerror();
answer_fn = dlsym(RTLD_DEFAULT, "answer");
if (!answer_fn) {
printf("FAIL: %s\n", dlerror());
return 1;
}
printf("Global lookup: %d\n", answer_fn());
return 0;
}
#endif
EOF
Build the shared library:
emcc test.c -DBUILD_PROVIDER -shared -fPIC -m64 -fwasm-exceptions -O1 \
-Wl,--export=answer -Wl,--export=answer_value -o provider.so
Build and run the main module:
emcc test.c -m64 -fwasm-exceptions -O1 \
-sMAIN_MODULE=2 -sENVIRONMENT=node -sEXIT_RUNTIME=1 \
--embed-file provider.so -o test.js
node test.js
Actual output (exit code 1):
Handle-specific lookup: 42
FAIL: Tried to lookup unknown symbol "answer" in dynamic lib: __main__
Expected: Global lookup: 42.
Replacing both -m64 flags with -m32 produces the same failure.
- Lenguaje dominante
- C++
- Estrellas
- 27.8k
- Forks
- 3.6k
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 179
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de emscripten-core/emscripten
-
`other.test_cmake_cxx_import_std` fails on CMake 3.30–4.0.2 due to missing `CMAKE_EXPERIMENTAL_CXX_IMPORT_STD` UUIDsPosiblemente ocupada @subhaushsingh la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
emscripten-core/emscripten#28160 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
emscripten-core/emscripten#27994 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
LEGACY_GL_EMULATION: generated fixed-function fragment shaders use mediump — fp16 overflow where mediump is half precisionPosiblemente ocupada @TheTomBritton la tomó hace 13 días. AbiertoDesktop OpenGL emulation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
emscripten-core/emscripten#27948 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
emscripten-core/emscripten#27906 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
run_python, run_python_compiler could readlink -fPosiblemente ocupada @kapouer la tomó hace 128 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
emscripten-core/emscripten#27211 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de emscripten-core/emscripten
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
-
error not reported I/O low priority rt_lib
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
[XLA] hlo/pass/README.md says passes implement Run; since the NVI change they implement RunImplAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NVIDIA-RTX/NRI#312 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 9 días