Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

A stack-overflow in printf_common()

Abierto
#4,391 4 comentarios 0 reacciones 0 asignados Ver en GitHub

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
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
cpp, wasm
Área
compilers

Línea de trabajo

Reproduce el fallo con ./bin/wasm-ctor-eval POC4 y, a continuación, inspecciona wasm::WasmBinaryBuilder::getBlockOrSingleton(), visitTryOrTryInBlock() y getNextLabel() usando el stack trace indicado como punto de entrada. Se considera completado cuando POC4 ya no provoca un stack overflow ni un segmentation fault.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

interpreter

Version:

version_103

System information

command:

./bin/wasm-ctor-eval POC4

POC4.zip

Result

1887835 segmentation fault  ./bin/wasm-ctor-eval 

GDB information

Program received signal SIGSEGV, Segmentation fault.
[----------------------------------registers-----------------------------------]
RAX: 0xfbad8001 
RBX: 0x0 
RCX: 0x0 
RDX: 0x7fffff7ff490 --> 0x3000000020 (' ')
RSI: 0x7ffff7df5092 --> 0x6d73617700756c25 ('%lu')
RDI: 0x7fffff7ff2e0 --> 0x7ffffbad8001 
RBP: 0x7fffff7ff2c0 --> 0x7fffff7ff460 --> 0x0 
RSP: 0x7fffff7fed50 
RIP: 0x7ffff6f16a01 (<__vfprintf_internal+33>:	mov    DWORD PTR [rbp-0x4c0],ecx)
R8 : 0x0 
R9 : 0x7fffff7ff3d0 --> 0x0 
R10: 0x7ffff6f2c180 (<___vsnprintf>:	endbr64)
R11: 0x7ffff7088be0 --> 0x555555800a40 --> 0x6201f248 
R12: 0x7fffff7ff2e0 --> 0x7ffffbad8001 
R13: 0x7ffff7df5092 --> 0x6d73617700756c25 ('%lu')
R14: 0x7fffff7ff490 --> 0x3000000020 (' ')
R15: 0x7fffff7ff490 --> 0x3000000020 (' ')
EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x7ffff6f169f6 <__vfprintf_internal+22>:	mov    r12,rdi
   0x7ffff6f169f9 <__vfprintf_internal+25>:	push   rbx
   0x7ffff6f169fa <__vfprintf_internal+26>:	sub    rsp,0x548
=> 0x7ffff6f16a01 <__vfprintf_internal+33>:	mov    DWORD PTR [rbp-0x4c0],ecx
   0x7ffff6f16a07 <__vfprintf_internal+39>:	mov    rax,QWORD PTR fs:0x28
   0x7ffff6f16a10 <__vfprintf_internal+48>:	mov    QWORD PTR [rbp-0x38],rax
   0x7ffff6f16a14 <__vfprintf_internal+52>:	xor    eax,eax
   0x7ffff6f16a16 <__vfprintf_internal+54>:	mov    rax,QWORD PTR [rip+0x171453]        # 0x7ffff7087e70
[------------------------------------stack-------------------------------------]
Invalid $SP address: 0x7fffff7fed50
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x00007ffff6f16a01 in __vfprintf_internal (s=s@entry=0x7fffff7ff2e0, format=format@entry=0x7ffff7df5092 "%lu", ap=ap@entry=0x7fffff7ff490, mode_flags=mode_flags@entry=0x0) at vfprintf-internal.c:1289
1289	vfprintf-internal.c: No such file or directory.

gdb-peda$ bt 20
#0  0x00007ffff6f16a01 in __vfprintf_internal (s=s@entry=0x7fffff7ff2e0, format=format@entry=0x7ffff7df5092 "%lu", ap=ap@entry=0x7fffff7ff490, mode_flags=mode_flags@entry=0x0) at vfprintf-internal.c:1289
#1  0x00007ffff6f2c11a in __vsnprintf_internal (string=0x7fffff7ff460 "", maxlen=<optimized out>, format=0x7ffff7df5092 "%lu", args=0x7fffff7ff490, mode_flags=0x0) at vsnprintf.c:114
#2  0x000055555557737f in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > __gnu_cxx::__to_xstring<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char>(int (*)(char*, unsigned long, char const*, __va_list_tag*), unsigned long, char const*, ...) ()
#3  0x00007ffff7c00030 in wasm::WasmBinaryBuilder::getNextLabel() () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#4  0x00007ffff7c0eeef in wasm::WasmBinaryBuilder::getBlockOrSingleton(wasm::Type) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#5  0x00007ffff7c08d57 in wasm::WasmBinaryBuilder::visitTryOrTryInBlock(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#6  0x00007ffff7c0a2c7 in wasm::WasmBinaryBuilder::readExpression(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#7  0x00007ffff7c0b13e in wasm::WasmBinaryBuilder::processExpressions() () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#8  0x00007ffff7c0ef20 in wasm::WasmBinaryBuilder::getBlockOrSingleton(wasm::Type) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#9  0x00007ffff7c08d57 in wasm::WasmBinaryBuilder::visitTryOrTryInBlock(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#10 0x00007ffff7c0a2c7 in wasm::WasmBinaryBuilder::readExpression(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#11 0x00007ffff7c0b13e in wasm::WasmBinaryBuilder::processExpressions() () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#12 0x00007ffff7c0ef20 in wasm::WasmBinaryBuilder::getBlockOrSingleton(wasm::Type) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#13 0x00007ffff7c08d57 in wasm::WasmBinaryBuilder::visitTryOrTryInBlock(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#14 0x00007ffff7c0a2c7 in wasm::WasmBinaryBuilder::readExpression(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#15 0x00007ffff7c0b13e in wasm::WasmBinaryBuilder::processExpressions() () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#16 0x00007ffff7c0ef20 in wasm::WasmBinaryBuilder::getBlockOrSingleton(wasm::Type) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#17 0x00007ffff7c08d57 in wasm::WasmBinaryBuilder::visitTryOrTryInBlock(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#18 0x00007ffff7c0a2c7 in wasm::WasmBinaryBuilder::readExpression(wasm::Expression*&) () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
#19 0x00007ffff7c0b13e in wasm::WasmBinaryBuilder::processExpressions() () from /home/zxq/CVE_testing/sourceproject/binaryen/bin/../lib/libbinaryen.so
(More stack frames follow...)
gdb-peda$ 

Lenguaje dominante
WebAssembly
Estrellas
8.7k
Forks
893
Merge medio
1 d 11 h
PR fusionados (30 d)
74

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WebAssembly/binaryen

Todos los issues de WebAssembly/binaryen

Issues similares

Más issues de Compilers

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.