Unaligned packet field (UBSanitizer error report) plus warnings...
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- networking
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 3.1k
- Fork
- 761
- Merge medio
- 5g 11h
- PR unite (30g)
- 27
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di seladb/PcapPlusPlus
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
seladb/PcapPlusPlus#2390 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 4/5 1-2 giorni Idoneità per principianti 52/100
seladb/PcapPlusPlus#2359 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Track: serialization support for all layersForse di nuovo libera @way-wei96 l’ha presa 15 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement good first issue
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
seladb/PcapPlusPlus#2278 · 19 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
seladb/PcapPlusPlus#2135 ·
I maintainer di solito rispondono entro 2 giorni
-
Xdp Rx QueueForse già presa @JasMetzger l’ha presa 395 giorni fa. Apertaquestion
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
seladb/PcapPlusPlus#1992 · 14 commenti ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di seladb/PcapPlusPlus
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/DirectXShaderCompiler#9173 ·
I maintainer di solito rispondono entro 2 giorni
-
feature:config kind:docs os:windows toolchain:cmake triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno