When a literal appears in the file multiple times its identity should be
preserved.
CLHS 3.2.4.4:
> If two literal objects appearing in the source code for a single
> file processed with the file compiler are the identical, the
> corresponding objects in the compiled code must also be the identical.
Previously, every bytecode object created during ext::bc-compile-file
had its own vector of constants making it impossible to satisfy this
constraint. Thus, we change ext::bc-compile-file to use the same
constants vector for all bytecode objects from the same file. The
simplest way to achieve this is to use the same compiler environment
for all of the compilation process and push the read-compile loop
into the si_bc_compile_from_stream function implemented in C.
The function SB-BSD-SOCKETS:GET-PROTOCOL-BY-NAME did not signal
an error when it was unable to find a protocol. This is fixed now
and an error of type UNKNOWN-PROTOCOL, with an accessor named
UNKNOWN-PROTOCOL-NAME, is being signaled. These two names are also
exported from the package SB-BSD-SOCKETS.
A test case is added.
Several other test cases are fixed with regard to :NO-ERROR clauses
inside HANDLER-CASEs.
Only call handlers established in the current thread and use atomic
operations to update *descriptor-handlers*.
Closes#588.
Additionally:
- improve the test code
- add a test for the leak
- provide internet machine link for the tutorial
On linux, using AI_ADDRCONFIG causes getaddrinfo to return no ip
address for localhost when only the loopback connection is
active. Also, we only get ipv4 addresses anyway due to specifying
ai_family = AF_INET, therefore the AI_ADDRCONFIG flag in not necessary
anyway.
After the recent refactor of GET-HOST-BY-NAME to use getaddrinfo,
these functions had multiple problems that are fixed in this commit:
- in GET-HOST-BY-NAME, freeaddrinfo was called on an unitialized
struct addrinfo if getaddrinfo failed
- error handling in GET-HOST-BY-NAME wasn't working, we were still
trying to use the error handling for gethostbyname
- GET-HOST-BY-ADDRESS still used the deprecated gethostbyaddr function
Remove flag AI_V4MAPPED which takes effect only for AF_INET6
family. Currently we do not work at all with ipv6, hence this flag is
a no-op. Moreover Android has no definition for this flag. See !172.
Fix contributed by Polos Ruetz. Closes!172.
C inline information is saved in +default-machine+, which was
previously a constant. However, the value assigned to
+default-machine+ is recomputed during load and compile
time. Technically, assigning a constant a new value which is not eql
to the old one is undefined behaviour in the ANSI standard. What ECL
did was simply to reassign the constant when compiling
cmpc-machine.lsp. However, this meant that the inline information
which was added to +default-machine+ when loading sysfun.lsp was
lost. Thus, all ECL source files compiled after cmpc-machine.lsp were
compiled without inline information. We prevent this by using an
ordinary variable *default-machine* instead of a constant.
bc-compile is more conforming now (we validate definition and name, also our
closure compilation is a bit better, still broken though).
Also improve some error messages and add periods at the end.
This keyword argument was added in SBCL in 2010 and is used to pass
ABORT to CL:CLOSE.
The absence of this would obviously cause errors when code expects
this to be available. For example, this happens in usocket's
SOCKET-CONNECT and would cause several errors in their test suite
with obscure error messages like
Wrong number of arguments passed to function #<compiled-function 0000000003562e80>.
This is untested on Windows.
To avoid confusion we create a separate numeric branch from 3.1.7 (ASDF
3.2.0 release is on its way).
This change backports fix for static-library builds. Fixes#177.
NETDB_INTERNAL and NETDB_SUCCESS are not defined by POSIX, so some
libc implementations (such as musl) do not have them. When compiling
sockets contrib, check if these are defined and, if not, define them to
be zero.