Unaligned packet field (UBSanitizer error report) plus warnings...
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp
- Área
- networking
Línea de trabajo
Start by reading Packet.h at the reported lines 347 and 112, then trace how PcapNgFileReaderDevice::getNextPacket supplies the RawPacket used to construct Packet. Reproduce the report with UBSan and a compressed pcapng file; the issue does not identify a specific test or provide a reproducer. Done means the reported invalid-vptr error is understood and resolved, with the requested compiler-warning scope clarified.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hello,
I just observer this from the UBSanitizer(GCC: -fsanitize=undefined):
/home/.../pcap++-src/Packet++/header/Packet.h:347:8: runtime error: member access within address 0x79e286800cb0 which does not point to an object of type 'Packet'
0x79e286800cb0: note: object has invalid vptr
00 00 00 00 10 98 85 00 00 00 00 00 60 0c 80 86 e2 79 00 00 e0 b1 00 00 60 50 00 00 00 b3 00 00
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
/home/.../pcap++-src/Packet++/header/Packet.h:112:22: runtime error: member call on address 0x79e286800cb0 which does not point to an object of type 'Packet'
0x79e286800cb0: note: object has invalid vptr
00 00 00 00 10 98 85 00 00 00 00 00 60 0c 80 86 e2 79 00 00 e0 b1 00 00 60 50 00 00 00 b3 00 00
^~~~~~~~~~~~~~~~~~~~~~~
invalid vptr
That implies unaligned memory access (which slows down the program most of the times).
I am just reading a compressed pcapng file using these functions only:
pcpp::PcapNgFileReaderDevice reader(filePath.data());
reader.open();
pcpp::RawPacket rawPacket;
reader.getNextPacket(rawPacket);
pcpp::Packet parsedPacket(std::addressof(rawPacket));
parsedPacket.isPacketOfType(pcpp::TCP);
tcpLayer->getLayerPayloadSize();
udpLayer->getLayerPayload();
parsedPacket.getLayerOfType<pcpp::TcpLayer>();
Also I get multiple warnings of these types:
-Weffc++
-Wsuggest-override
-Wconversion
-Wpedantic
-Wold-style-cast
when I include these files:
#include <Packet.h>
#include <UdpLayer.h>
#include <TcpLayer.h>
#include <PcapFileDevice.h>
It would be nice if these can get fixed somehow...
Thank You.
- Lenguaje dominante
- C++
- Estrellas
- 3.1k
- Forks
- 761
- Merge medio
- 5 d 11 h
- PR fusionados (30 d)
- 27
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 seladb/PcapPlusPlus
-
Streaming pcapng reader does not validate minimum block length before reading block contentsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
seladb/PcapPlusPlus#2390 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 4/5 1-2 días Aptitud para principiantes 52/100
seladb/PcapPlusPlus#2359 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
enhancement good first issue
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
seladb/PcapPlusPlus#2278 · 19 comentarios ·
Los mantenedores suelen responder en 2 días
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
seladb/PcapPlusPlus#2135 ·
Los mantenedores suelen responder en 2 días
-
Xdp Rx QueuePosiblemente ocupada @JasMetzger la tomó hace 395 días. Abiertoquestion
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
seladb/PcapPlusPlus#1992 · 14 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de seladb/PcapPlusPlus
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoft/DirectXShaderCompiler#9173 ·
Los mantenedores suelen responder en 2 días
-
feature:config kind:docs os:windows toolchain:cmake triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día