aspl-lang / aspl-lang/aspl

internet: TLS support is broken in Clang/ZigCC-based Windows builds

Open
#39 1 comment 0 reactions 1 assignee Claimed by @Wertzui123 View on GitHub
bug
Dominant language
C
Stars
31
Forks
6
PR merge metrics
No merged PRs in 30d

Description

### Bug description

The `internet` module internally uses a third-party C library called [TLSe](https://github.com/eduardsui/tlse) for implementing [TLS](https://github.com/eduardsui/tlse) support, which powers protocols like HTTP**S** or WS**S**. However, this library does not seem to work when compiled with an LLVM-based compiler like Clang or Zig CC for Windows - the program crashes due to an invalid instruction trap when trying to establish a connection over a secured socket. This affects the C backend (when Clang/Zig CC is used as the C compiler) as well as the AIL backend, since the CD pipeline (recently) uses Clang to build the default AIL templates.

### Reproducing instructions

Compile any program that uses the `internet` module and actually uses TLS instead of unsecured sockets. Run it and watch it crash.

### Expected behaviour

It should obviously work as it does for example with GCC instead of crashing.

### Environment

_No response_

### Additional context

I have started to investigate this bug (which seems to be completely unrelated to ASPL and really just a problem with TLSe and libtomcrypt itself) and made some progress on fixing it already, which is why I will assign this issue to myself.

### Contributing guidelines

- [x] I agree to follow this project's contributing guidelines

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.