Fix bugs in cosmocc toolchain

This change integrates e58abc1110b335a3341e8ad5821ad8e3880d9bb2 from
https://github.com/ahgamut/musl-cross-make/ which fixes the issues we
were having with our C language extension for symbolic constants. This
change also performs some code cleanup and bug fixes to getaddrinfo().
It's now possible to compile projects like ncurses, readline and python
without needing to patch anything upstream, except maybe a line or two.
Pretty soon it should be possible to build a Linux distro on Cosmo.
This commit is contained in:
Justine Tunney 2023-06-08 23:44:03 -07:00
parent 22f81a8d50
commit 23e235b7a5
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
272 changed files with 3491 additions and 4350 deletions

View file

@ -4,9 +4,9 @@
#define FetchHeaderEqualCase(H, S) \
SlicesEqualCase(S, strlen(S), FetchHeaderData(H), FetchHeaderLength(H))
#define kaNONE 0
#define kaOPEN 1
#define kaKEEP 2
#define kaNONE 0
#define kaOPEN 1
#define kaKEEP 2
#define kaCLOSE 3
static int LuaFetch(lua_State *L) {
@ -66,7 +66,7 @@ static int LuaFetch(lua_State *L) {
lua_getfield(L, 2, "keepalive");
if (!lua_isnil(L, -1)) {
if (lua_istable(L, -1)) {
keepalive = kaOPEN; // will be updated based on host later
keepalive = kaOPEN; // will be updated based on host later
} else if (lua_isboolean(L, -1)) {
keepalive = lua_toboolean(L, -1) ? kaOPEN : kaNONE;
if (keepalive) {
@ -74,8 +74,9 @@ static int LuaFetch(lua_State *L) {
lua_setfield(L, 2, "keepalive");
}
} else {
return luaL_argerror(L, 2, "invalid keepalive value;"
" boolean or table expected");
return luaL_argerror(L, 2,
"invalid keepalive value;"
" boolean or table expected");
}
}
lua_getfield(L, 2, "headers");
@ -180,18 +181,18 @@ static int LuaFetch(lua_State *L) {
// check if hosthdr is in keepalive table
if (keepalive && lua_istable(L, 2)) {
lua_getfield(L, 2, "keepalive");
lua_getfield(L, -1, "close"); // aft: -2=tbl, -1=close
lua_getfield(L, -2, hosthdr); // aft: -3=tbl, -2=close, -1=hosthdr
lua_getfield(L, -1, "close"); // aft: -2=tbl, -1=close
lua_getfield(L, -2, hosthdr); // aft: -3=tbl, -2=close, -1=hosthdr
if (lua_isinteger(L, -1)) {
sock = lua_tointeger(L, -1);
keepalive = lua_toboolean(L, -2) ? kaCLOSE : kaKEEP;
// remove host mapping, as the socket is ether being closed
// (so needs to be removed) or will be added after the request is done;
// this also helps to keep the mapping clean in case of an error
lua_pushnil(L); // aft: -4=tbl, -3=close, -2=hosthdr, -1=nil
lua_pushnil(L); // aft: -4=tbl, -3=close, -2=hosthdr, -1=nil
lua_setfield(L, -4, hosthdr);
VERBOSEF("(ftch) reuse socket %d for host %s (and %s)",
sock, hosthdr, keepalive == kaCLOSE ? "close" : "keep");
VERBOSEF("(ftch) reuse socket %d for host %s (and %s)", sock, hosthdr,
keepalive == kaCLOSE ? "close" : "keep");
}
lua_settop(L, 2); // drop all added elements to keep the stack balanced
}
@ -221,8 +222,9 @@ static int LuaFetch(lua_State *L) {
"%s%s"
"\r\n",
method, _gc(EncodeUrl(&url, 0)), hosthdr,
(keepalive == kaNONE || keepalive == kaCLOSE) ? "close"
: (connhdr ? connhdr : "keep-alive"),
(keepalive == kaNONE || keepalive == kaCLOSE)
? "close"
: (connhdr ? connhdr : "keep-alive"),
agenthdr, conlenhdr, headers ? headers : "");
appendd(&request, body, bodylen);
requestlen = appendz(request).i;
@ -242,8 +244,9 @@ static int LuaFetch(lua_State *L) {
* Connect to server.
*/
ip = ntohl(((struct sockaddr_in *)addr->ai_addr)->sin_addr.s_addr);
DEBUGF("(ftch) client connecting %hhu.%hhu.%hhu.%hhu:%d", ip >> 24, ip >> 16,
ip >> 8, ip, ntohs(((struct sockaddr_in *)addr->ai_addr)->sin_port));
DEBUGF("(ftch) client connecting %hhu.%hhu.%hhu.%hhu:%d", ip >> 24,
ip >> 16, ip >> 8, ip,
ntohs(((struct sockaddr_in *)addr->ai_addr)->sin_port));
CHECK_NE(-1, (sock = GoodSocket(addr->ai_family, addr->ai_socktype,
addr->ai_protocol, false, &timeout)));
rc = connect(sock, addr->ai_addr, addr->ai_addrlen);
@ -440,7 +443,7 @@ static int LuaFetch(lua_State *L) {
if (rc) goto Finished;
break;
default:
unreachable;
__builtin_unreachable();
}
}
@ -452,9 +455,8 @@ Finished:
// check if the server has requested to close the connection
// https://www.rfc-editor.org/rfc/rfc2616#section-14.10
if (keepalive && keepalive != kaCLOSE
&& FetchHasHeader(kHttpConnection)
&& FetchHeaderEqualCase(kHttpConnection, "close")) {
if (keepalive && keepalive != kaCLOSE && FetchHasHeader(kHttpConnection) &&
FetchHeaderEqualCase(kHttpConnection, "close")) {
VERBOSEF("(ftch) close keepalive on server request");
keepalive = kaCLOSE;
}

View file

@ -298,7 +298,7 @@ int LuaParseParams(lua_State *L) {
return 1;
} else {
luaL_error(L, "out of memory");
unreachable;
__builtin_unreachable();
}
} else {
return lua_gettop(L);
@ -321,7 +321,7 @@ int LuaParseHost(lua_State *L) {
return 1;
} else {
luaL_error(L, "out of memory");
unreachable;
__builtin_unreachable();
}
} else {
return lua_gettop(L);
@ -340,7 +340,7 @@ int LuaBsr(lua_State *L) {
return 1;
} else {
luaL_argerror(L, 1, "zero");
unreachable;
__builtin_unreachable();
}
}
@ -351,7 +351,7 @@ int LuaBsf(lua_State *L) {
return 1;
} else {
luaL_argerror(L, 1, "zero");
unreachable;
__builtin_unreachable();
}
}
@ -381,7 +381,7 @@ int LuaIndentLines(lua_State *L) {
j = luaL_optinteger(L, 2, 1);
if (!(0 <= j && j <= 65535)) {
luaL_argerror(L, 2, "not in range 0..65535");
unreachable;
__builtin_unreachable();
}
p = IndentLines(p, n, &n, j);
lua_pushlstring(L, p, n);
@ -400,7 +400,7 @@ int LuaGetMonospaceWidth(lua_State *L) {
w = strwidth(luaL_checkstring(L, 1), luaL_optinteger(L, 2, 0) & 7);
} else {
luaL_argerror(L, 1, "not integer or string");
unreachable;
__builtin_unreachable();
}
lua_pushinteger(L, w);
return 1;
@ -490,7 +490,7 @@ int LuaBarf(lua_State *L) {
offset = luaL_checkinteger(L, 5);
if (offset < 1) {
luaL_error(L, "offset must be >= 1");
unreachable;
__builtin_unreachable();
}
--offset;
}
@ -498,11 +498,11 @@ int LuaBarf(lua_State *L) {
flags = O_WRONLY | O_SEQUENTIAL | luaL_optinteger(L, 4, O_TRUNC | O_CREAT);
if (flags & O_NONBLOCK) {
luaL_error(L, "O_NONBLOCK not allowed");
unreachable;
__builtin_unreachable();
}
if ((flags & O_APPEND) && offset) {
luaL_error(L, "O_APPEND with offset not possible");
unreachable;
__builtin_unreachable();
}
if ((fd = open(luaL_checkstring(L, 1), flags, mode)) == -1) {
return LuaUnixSysretErrno(L, "open", olderr);
@ -555,7 +555,7 @@ static int LuaCheckControlFlags(lua_State *L, int idx) {
int f = luaL_optinteger(L, idx, 0);
if (f & ~(kControlWs | kControlC0 | kControlC1)) {
luaL_argerror(L, idx, "invalid control flags");
unreachable;
__builtin_unreachable();
}
return f;
}
@ -582,7 +582,7 @@ int LuaEncodeLatin1(lua_State *L) {
return 1;
} else {
luaL_error(L, "out of memory");
unreachable;
__builtin_unreachable();
}
}
@ -592,7 +592,7 @@ int LuaGetRandomBytes(lua_State *L) {
n = luaL_optinteger(L, 1, 16);
if (!(n > 0 && n <= 256)) {
luaL_argerror(L, 1, "not in range 1..256");
unreachable;
__builtin_unreachable();
}
CHECK_EQ(n, getrandom(luaL_buffinitsize(L, &buf, n), n, 0));
luaL_pushresultsize(&buf, n);
@ -664,7 +664,7 @@ static dontinline int LuaCoderImpl(lua_State *L,
free(p);
} else {
luaL_error(L, "out of memory");
unreachable;
__builtin_unreachable();
}
return 1;
} else {
@ -739,7 +739,7 @@ int LuaEscapeLiteral(lua_State *L) {
return 1;
} else {
luaL_error(L, "out of memory");
unreachable;
__builtin_unreachable();
}
}
@ -856,7 +856,7 @@ int LuaBenchmark(lua_State *L) {
break;
} else if (attempts >= maxattempts) {
luaL_error(L, "system is under too much load to run benchmark");
unreachable;
__builtin_unreachable();
}
}
overhead = avgticks;
@ -878,7 +878,7 @@ int LuaBenchmark(lua_State *L) {
break;
} else if (attempts >= maxattempts) {
luaL_error(L, "system is under too much load to run benchmark");
unreachable;
__builtin_unreachable();
}
}
avgticks = MAX(avgticks - overhead, 0);
@ -898,12 +898,12 @@ static void LuaCompress2(lua_State *L, void *dest, size_t *destLen,
break;
case Z_BUF_ERROR:
luaL_error(L, "out of memory");
unreachable;
__builtin_unreachable();
case Z_STREAM_ERROR:
luaL_error(L, "invalid level");
unreachable;
__builtin_unreachable();
default:
unreachable;
__builtin_unreachable();
}
}
@ -948,7 +948,7 @@ int LuaUncompress(lua_State *L) {
if (lua_isnoneornil(L, 2)) {
if ((rc = unuleb64(p, n, &m)) == -1 || n < rc + 4) {
luaL_error(L, "compressed value too short to be valid");
unreachable;
__builtin_unreachable();
}
len = m;
crc = READ32LE(p + rc);
@ -956,14 +956,14 @@ int LuaUncompress(lua_State *L) {
if (uncompress((void *)q, &m, (unsigned char *)p + rc + 4, n) != Z_OK ||
m != len || crc32_z(0, q, m) != crc) {
luaL_error(L, "compressed value is corrupted");
unreachable;
__builtin_unreachable();
}
} else {
len = m = luaL_checkinteger(L, 2);
q = luaL_buffinitsize(L, &buf, m);
if (uncompress((void *)q, &m, (void *)p, n) != Z_OK || m != len) {
luaL_error(L, "compressed value is corrupted");
unreachable;
__builtin_unreachable();
}
}
luaL_pushresultsize(&buf, m);

View file

@ -543,10 +543,10 @@ static struct DecodeJson Parse(struct lua_State *L, const char *p,
goto StringFailureWithReason;
default:
unreachable;
__builtin_unreachable();
}
}
unreachable;
__builtin_unreachable();
StringFailureWithReason:
luaL_pushresultsize(&b, 0);
lua_pop(L, 1);

View file

@ -72,7 +72,7 @@ static int LuaMaxmindOpen(lua_State *L) {
if ((err = MMDB_open(p, 0, &db->mmdb)) != MMDB_SUCCESS) {
free(db);
luaL_error(L, "MMDB_open(%s) → MMDB_%s", p, GetMmdbError(err));
unreachable;
__builtin_unreachable();
}
db->refs = 1;
udb = lua_newuserdatauv(L, sizeof(db), 1);
@ -88,7 +88,7 @@ static wontreturn void LuaThrowMaxmindIpError(lua_State *L,
(ip & 0xff000000) >> 030, (ip & 0x00ff0000) >> 020,
(ip & 0x0000ff00) >> 010, (ip & 0x000000ff) >> 000,
GetMmdbError(err));
unreachable;
__builtin_unreachable();
}
static int LuaMaxmindDbLookup(lua_State *L) {

View file

@ -106,7 +106,7 @@ static int LuaPathJoin(lua_State *L) {
return 1;
} else {
luaL_error(L, "missing argument");
unreachable;
__builtin_unreachable();
}
}

View file

@ -87,7 +87,7 @@ static int LuaReSearch(lua_State *L) {
if (f & ~(REG_EXTENDED | REG_ICASE | REG_NEWLINE | REG_NOSUB |
REG_NOTBOL << 8 | REG_NOTEOL << 8)) {
luaL_argerror(L, 3, "invalid flags");
unreachable;
__builtin_unreachable();
}
if ((r = LuaReCompileImpl(L, p, f))) {
return LuaReSearchImpl(L, r, s, f);
@ -104,7 +104,7 @@ static int LuaReCompile(lua_State *L) {
f = luaL_optinteger(L, 2, 0);
if (f & ~(REG_EXTENDED | REG_ICASE | REG_NEWLINE | REG_NOSUB)) {
luaL_argerror(L, 2, "invalid flags");
unreachable;
__builtin_unreachable();
}
if ((r = LuaReCompileImpl(L, p, f))) {
return 1;
@ -125,7 +125,7 @@ static int LuaReRegexSearch(lua_State *L) {
f = luaL_optinteger(L, 3, 0);
if (f & ~(REG_NOTBOL << 8 | REG_NOTEOL << 8)) {
luaL_argerror(L, 3, "invalid flags");
unreachable;
__builtin_unreachable();
}
return LuaReSearchImpl(L, r, s, f);
}

View file

@ -2188,7 +2188,7 @@ static bool OpenZip(bool force) {
} else {
b = m;
}
if ((d = GetZipCdir(b, n))) {
if ((d = GetZipEocd(b, n, 0))) {
if (zmap) {
LOGIFNEG1(munmap(zmap, zbase + zsize - zmap));
}
@ -2196,8 +2196,8 @@ static bool OpenZip(bool force) {
zbase = b;
zsize = n;
zcdir = d;
DCHECK(IsZipCdir32(zbase, zsize, zcdir - zbase) ||
IsZipCdir64(zbase, zsize, zcdir - zbase));
DCHECK(IsZipEocd32(zbase, zsize, zcdir - zbase) == kZipOk ||
IsZipEocd64(zbase, zsize, zcdir - zbase) == kZipOk);
memcpy(&zst, &st, sizeof(st));
IndexAssets();
return true;
@ -3331,7 +3331,7 @@ static const char *LuaCheckPath(lua_State *L, int idx, size_t *pathlen) {
if (!IsReasonablePath(path, *pathlen)) {
WARNF("(srvr) bad path %`'.*s", *pathlen, path);
luaL_argerror(L, idx, "bad path");
unreachable;
__builtin_unreachable();
}
}
return path;
@ -3347,7 +3347,7 @@ static const char *LuaCheckHost(lua_State *L, int idx, size_t *hostlen) {
if (!IsAcceptableHost(host, *hostlen)) {
WARNF("(srvr) bad host %`'.*s", *hostlen, host);
luaL_argerror(L, idx, "bad host");
unreachable;
__builtin_unreachable();
}
}
return host;
@ -3357,7 +3357,7 @@ static void OnlyCallFromInitLua(lua_State *L, const char *api) {
if (isinitialized) {
luaL_error(L, "%s() should be called %s", api,
"from the global scope of .init.lua");
unreachable;
__builtin_unreachable();
}
}
@ -3365,7 +3365,7 @@ static void OnlyCallFromMainProcess(lua_State *L, const char *api) {
if (__isworker) {
luaL_error(L, "%s() should be called %s", api,
"from .init.lua or the repl");
unreachable;
__builtin_unreachable();
}
}
@ -3373,7 +3373,7 @@ static void OnlyCallDuringConnection(lua_State *L, const char *api) {
if (!ishandlingconnection) {
luaL_error(L, "%s() can only be called %s", api,
"while handling a connection");
unreachable;
__builtin_unreachable();
}
}
@ -3381,7 +3381,7 @@ static void OnlyCallDuringRequest(lua_State *L, const char *api) {
if (!ishandlingrequest) {
luaL_error(L, "%s() can only be called %s", api,
"while handling a request");
unreachable;
__builtin_unreachable();
}
}
@ -3432,7 +3432,7 @@ static int LuaServeRedirect(lua_State *L) {
code = luaL_checkinteger(L, 1);
if (!(300 <= code && code <= 399)) {
luaL_argerror(L, 1, "bad status code");
unreachable;
__builtin_unreachable();
}
location = luaL_checklstring(L, 2, &loclen);
if (cpm.msg.version < 10) {
@ -3441,7 +3441,7 @@ static int LuaServeRedirect(lua_State *L) {
} else {
if (!(eval = EncodeHttpHeaderValue(location, loclen, 0))) {
luaL_argerror(L, 2, "invalid location");
unreachable;
__builtin_unreachable();
}
VERBOSEF("(rsp) %d redirect to %`'s", code, location);
cpm.luaheaderp =
@ -3489,11 +3489,11 @@ static int LuaProgramTrustedIp(lua_State *L) {
cidr = luaL_optinteger(L, 2, 32);
if (!(0 <= ip && ip <= 0xffffffff)) {
luaL_argerror(L, 1, "ip out of range");
unreachable;
__builtin_unreachable();
}
if (!(0 <= cidr && cidr <= 32)) {
luaL_argerror(L, 2, "cidr should be 0 .. 32");
unreachable;
__builtin_unreachable();
}
ip32 = ip;
imask = ~(0xffffffffu << (32 - cidr));
@ -3501,7 +3501,7 @@ static int LuaProgramTrustedIp(lua_State *L) {
luaL_argerror(L, 1,
"ip address isn't the network address; "
"it has bits masked by the cidr");
unreachable;
__builtin_unreachable();
}
ProgramTrustedIp(ip, cidr);
return 0;
@ -3512,7 +3512,7 @@ static int LuaIsTrusted(lua_State *L) {
ip = luaL_checkinteger(L, 1);
if (!(0 <= ip && ip <= 0xffffffff)) {
luaL_argerror(L, 1, "ip out of range");
unreachable;
__builtin_unreachable();
}
lua_pushboolean(L, IsTrustedIp(ip));
return 1;
@ -3527,7 +3527,7 @@ static int LuaRespond(lua_State *L, char *R(unsigned, const char *)) {
code = luaL_checkinteger(L, 1);
if (!(100 <= code && code <= 999)) {
luaL_argerror(L, 1, "bad status code");
unreachable;
__builtin_unreachable();
}
if (lua_isnoneornil(L, 2)) {
cpm.luaheaderp = R(code, GetHttpReason(code));
@ -3538,7 +3538,7 @@ static int LuaRespond(lua_State *L, char *R(unsigned, const char *)) {
free(p);
} else {
luaL_argerror(L, 2, "invalid");
unreachable;
__builtin_unreachable();
}
}
return 0;
@ -4234,12 +4234,12 @@ static int LuaSetHeader(lua_State *L) {
if ((h = GetHttpHeader(key, keylen)) == -1) {
if (!IsValidHttpToken(key, keylen)) {
luaL_argerror(L, 1, "invalid");
unreachable;
__builtin_unreachable();
}
}
if (!(eval = EncodeHttpHeaderValue(val, vallen, &evallen))) {
luaL_argerror(L, 2, "invalid");
unreachable;
__builtin_unreachable();
}
p = GetLuaResponse();
while (p - hdrbuf.p + keylen + 2 + evallen + 2 + 512 > hdrbuf.n) {
@ -4313,11 +4313,11 @@ static int LuaSetCookie(lua_State *L) {
if (!IsValidHttpToken(key, keylen)) {
luaL_argerror(L, 1, "invalid");
unreachable;
__builtin_unreachable();
}
if (!IsValidCookieValue(val, vallen)) {
luaL_argerror(L, 2, "invalid");
unreachable;
__builtin_unreachable();
}
ishostpref = keylen > strlen(hostpref) &&
@ -4329,7 +4329,7 @@ static int LuaSetCookie(lua_State *L) {
luaL_argerror(
L, 1,
_gc(xasprintf("%s and %s prefixes require SSL", hostpref, securepref)));
unreachable;
__builtin_unreachable();
}
appends(&buf, key);
@ -4346,7 +4346,7 @@ static int LuaSetCookie(lua_State *L) {
expires = lua_tostring(L, -1);
if (!ParseHttpDateTime(expires, -1)) {
luaL_argerror(L, 3, "invalid data format in Expires");
unreachable;
__builtin_unreachable();
}
}
appends(&buf, "; Expires=");
@ -4587,7 +4587,7 @@ static int LuaProgramSslPresharedKey(lua_State *L) {
p2 = luaL_checklstring(L, 2, &n2);
if (!n1 || n1 > MBEDTLS_PSK_MAX_LEN || !n2) {
luaL_argerror(L, 1, "bad preshared key length");
unreachable;
__builtin_unreachable();
}
psk.key = memcpy(malloc(n1), p1, n1);
psk.key_len = n1;
@ -4613,7 +4613,7 @@ static int LuaProgramSslCiphersuite(lua_State *L) {
OnlyCallFromInitLua(L, "ProgramSslCiphersuite");
if (!(suite = GetCipherSuite(luaL_checkstring(L, 1)))) {
luaL_argerror(L, 1, "unsupported or unknown ciphersuite");
unreachable;
__builtin_unreachable();
}
suites.p = realloc(suites.p, (++suites.n + 1) * sizeof(*suites.p));
suites.p[suites.n - 1] = suite->id;
@ -4813,7 +4813,7 @@ static int LuaBlackhole(lua_State *L) {
ip = luaL_checkinteger(L, 1);
if (!(0 <= ip && ip <= 0xffffffff)) {
luaL_argerror(L, 1, "ip out of range");
unreachable;
__builtin_unreachable();
}
lua_pushboolean(L, Blackhole(ip));
return 1;
@ -4845,7 +4845,7 @@ static int LuaAcquireToken(lua_State *L) {
uint32_t ip;
if (!tokenbucket.cidr) {
luaL_error(L, "ProgramTokenBucket() needs to be called first");
unreachable;
__builtin_unreachable();
}
GetClientAddr(&ip, 0);
lua_pushinteger(L, AcquireToken(tokenbucket.b, luaL_optinteger(L, 1, ip),
@ -4857,7 +4857,7 @@ static int LuaCountTokens(lua_State *L) {
uint32_t ip;
if (!tokenbucket.cidr) {
luaL_error(L, "ProgramTokenBucket() needs to be called first");
unreachable;
__builtin_unreachable();
}
GetClientAddr(&ip, 0);
lua_pushinteger(L, CountTokens(tokenbucket.b, luaL_optinteger(L, 1, ip),
@ -4868,7 +4868,7 @@ static int LuaCountTokens(lua_State *L) {
static int LuaProgramTokenBucket(lua_State *L) {
if (tokenbucket.cidr) {
luaL_error(L, "ProgramTokenBucket() can only be called once");
unreachable;
__builtin_unreachable();
}
lua_Number replenish = luaL_optnumber(L, 1, 1); // per second
lua_Integer cidr = luaL_optinteger(L, 2, 24);
@ -4877,31 +4877,31 @@ static int LuaProgramTokenBucket(lua_State *L) {
lua_Integer ban = luaL_optinteger(L, 5, MIN(ignore / 10, 1));
if (!(1 / 3600. <= replenish && replenish <= 1e6)) {
luaL_argerror(L, 1, "require 1/3600 <= replenish <= 1e6");
unreachable;
__builtin_unreachable();
}
if (!(8 <= cidr && cidr <= 32)) {
luaL_argerror(L, 2, "require 8 <= cidr <= 32");
unreachable;
__builtin_unreachable();
}
if (!(-1 <= reject && reject <= 126)) {
luaL_argerror(L, 3, "require -1 <= reject <= 126");
unreachable;
__builtin_unreachable();
}
if (!(-1 <= ignore && ignore <= 126)) {
luaL_argerror(L, 4, "require -1 <= ignore <= 126");
unreachable;
__builtin_unreachable();
}
if (!(-1 <= ban && ban <= 126)) {
luaL_argerror(L, 5, "require -1 <= ban <= 126");
unreachable;
__builtin_unreachable();
}
if (!(ignore <= reject)) {
luaL_argerror(L, 4, "require ignore <= reject");
unreachable;
__builtin_unreachable();
}
if (!(ban <= ignore)) {
luaL_argerror(L, 5, "require ban <= ignore");
unreachable;
__builtin_unreachable();
}
VERBOSEF("(token) deploying %,ld buckets "
"(one for every %ld ips) "

View file

@ -309,7 +309,7 @@ SendAnother:
if (rc) goto Finished;
break;
default:
unreachable;
__builtin_unreachable();
}
}