Unaligned packet field (UBSanitizer error report) plus warnings...
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- cpp
- Lĩnh vực
- networking
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 3.1k
- Fork
- 761
- Merge trung bình
- 5 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của seladb/PcapPlusPlus
-
Streaming pcapng reader does not validate minimum block length before reading block contentsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
seladb/PcapPlusPlus#2390 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 52/100
seladb/PcapPlusPlus#2359 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement good first issue
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
seladb/PcapPlusPlus#2278 · 19 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
seladb/PcapPlusPlus#2135 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Xdp Rx QueueCó thể đã có người làm @JasMetzger đã nhận 395 ngày trước. Đang mởquestion
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
seladb/PcapPlusPlus#1992 · 14 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của seladb/PcapPlusPlus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
table_translator 当一个 Prism 键映射到多个原码时,首个候选未按权重排序Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
microsoft/DirectXShaderCompiler#9173 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
feature:config kind:docs os:windows toolchain:cmake triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày