• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

c-ares / c-ares / 28942451702
90%

Build:
DEFAULT BRANCH: main
Ran 08 Jul 2026 12:29PM UTC
Jobs 1
Files 177
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jul 2026 12:26PM UTC coverage: 90.083% (+0.1%) from 89.956%
28942451702

push

github

web-flow
Punycode/IDNA support and encoding of Windows unicode search suffixes (#1031)

This PR implements native IDNA (punycode) support in a non-OS-specific
manner with no external dependencies, and uses it to convert unicode
search domains from system configuration (Windows registry, resolv.conf,
environment, ...) to the punycode form DNS needs.

Properly fixes the search-suffix half of #1016, which was closed by the
#1034 stop-gap (it dropped any non-ASCII Windows search suffix; this PR
replaces that). The other half of that issue — `GetAdaptersAddresses`
returning no DNS servers on some machines — is tracked separately in
#1020.

## Components

**Punycode codec** (`src/lib/str/ares_punycode.c`) — RFC 3492
encode/decode operating directly on UTF-8 via `ares_buf`, derived from
Ben Noordhuis's MIT implementation. Each domain label is coded
separately with the `xn--` prefix; the RFC's 32-bit overflow checks are
implemented on both directions; the decoder uses `ares_array` for
insertion rather than raw `memmove`; encoded labels beyond the 63-octet
DNS limit are rejected; blank labels are preserved so fully-qualified
names with a trailing dot round-trip.

**UTF-8 primitives** (`src/lib/str/ares_buf.c`) —
`ares_buf_fetch_codepoint()`, `ares_buf_append_codepoint()`,
`ares_buf_len_utf8()` and friends, with strict validation:
malformed/truncated sequences, overlong encodings, UTF-16 surrogate
halves, and codepoints beyond U+10FFFF are rejected in both directions,
so hostile `xn--` labels cannot decode into invalid unicode.

**UTS #46 mapping table** (`src/lib/str/ares_idnamap.c`, generated by
`unicode-codegen.py` from Unicode 17.0.0) — codepoint ranges with
disallowed/ignored/mapped status, searched with libc `bsearch()` (16
bytes/entry). Mappings are variable length (up to 18 codepoints), stored
in a shared deduplicated UTF-8 pool referenced by offset/length;
generation hard-errors on anything unrepresentable rather than
truncating. The generated file carries SPDX... (continued)

870 of 921 new or added lines in 12 files covered. (94.46%)

19 existing lines in 2 files now uncovered.

25161 of 27931 relevant lines covered (90.08%)

23738.93 hits per line

Uncovered Changes

Lines Coverage ∆ File
38
90.38
src/lib/str/ares_punycode.c
5
99.2
-0.16% test/ares-test-internal.cc
3
94.9
2.06% src/lib/str/ares_buf.c
3
98.46
-0.63% test/ares-test-init.cc
2
92.94
-0.28% src/lib/ares_sysconfig.c

Coverage Regressions

Lines Coverage ∆ File
18
10.0
-90.0% usr/include/c++/11/bits/ios_base.h
1
97.19
-0.56% src/lib/dsa/ares_htable.c
Jobs
ID Job ID Ran Files Coverage
1 28942451702.1 08 Jul 2026 12:29PM UTC 177
90.08
GitHub Action Run
Source Files on build 28942451702
  • Tree
  • List 177
  • Changed 14
  • Source Changed 11
  • Coverage Changed 14
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28942451702
  • 380be0d3 on github
  • Prev Build on main (#28835446606)
  • Next Build on main (#29194961879)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc