[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wget2 | Draft: CIDR support added for No Proxy. Testing Code Added (
From: |
@rockdaboot |
Subject: |
Re: wget2 | Draft: CIDR support added for No Proxy. Testing Code Added (!521) |
Date: |
Sun, 09 Apr 2023 11:19:15 +0000 |
Tim Rühsen commented:
If you look into the the failing tests, you finallyx find `test.log` saying
```
http.c:1557:76: runtime error: left shift of 4294967295 by 20 places cannot be
represented in type 'uint32_t' (aka 'unsigned int')
#0 0x7f7ba9b8e23d in wget_http_cidr_match
/builds/gnuwget/wget2/libwget/http.c:1557:76
#1 0x7f7ba9b8e23d in wget_http_match_no_proxy
/builds/gnuwget/wget2/libwget/http.c:1583:18
#2 0x55b957cd5cff in test_match_no_proxy
/builds/gnuwget/wget2/unit-tests/test.c:2517:11
#3 0x55b957cd5cff in main /builds/gnuwget/wget2/unit-tests/test.c:2676:2
#4 0x7f7ba93cc189 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#5 0x7f7ba93cc244 in __libc_start_main csu/../csu/libc-start.c:381:3
#6 0x55b957c12180 in _start
(/builds/gnuwget/wget2/unit-tests/.libs/test+0x64180) (BuildId:
7fb4766f8d4616d09e6cf482769f16c54c899688)
SUMMARY: UndefinedBehaviorSanitizer: invalid-shift-base http.c:1557:76 in
FAIL test (exit status: 1)
```
The UB sanitizer is a bit picky.
There are several ways to suppress or fix it.
I'd suggest to fix it by not overflowing the uint32_t (e.g. shifting 0xFFFFFFFF
to the right and then iverting the result).
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/merge_requests/521#note_1346091645
You're receiving this email because of your account on gitlab.com.