Skip to content

Instantly share code, notes, and snippets.

@ADKaster
ADKaster / watier.cpp
Created February 29, 2020 08:02
Waiter program that waits on a sleeping child (Serenity only)
#include <AK/Assertions.h>
#include <AK/LogStream.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@ADKaster
ADKaster / waiter.cpp
Last active March 1, 2020 18:54
Waiter program that waits on a sleeping child
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
extern char** environ;
@ADKaster
ADKaster / c_cpp_properties.json
Created July 9, 2020 02:21
VsCode C/C++ Extension configuration
{
"configurations": [
{
"name": "ARM",
"includePath": [
"${workspaceFolder}/projects/lpc40xx_freertos/**",
"${workspaceFolder}/projects/lpc40xx_freertos/l1_freertos/portable/gcc/arm_cm4f"
],
"defines": [],
"compilerPath": "${workspaceRoot}/toolchains/linux/gcc-arm-none-eabi-8-2019-q3-update/bin/arm-none-eabi-gcc",
FAILED: AK/Tests/CMakeFiles/TestTypeTraits.dir/TestTypeTraits.cpp.o
/usr/bin/c++ -I../Libraries -I../. -Wno-unknown-warning-option -Wall -Wextra -Werror -Wmissing-declarations -Wformat=2 -fdiagnostics-color=always -ftls-model=initial-exec -fconcepts -std=c++2a -MD -MT AK/Tests/CMakeFiles/TestTypeTraits.dir/TestTypeTraits.cpp.o -MF AK/Tests/CMakeFiles/TestTypeTraits.dir/TestTypeTraits.cpp.o.d -o AK/Tests/CMakeFiles/TestTypeTraits.dir/TestTypeTraits.cpp.o -c ../AK/Tests/TestTypeTraits.cpp
../AK/Tests/TestTypeTraits.cpp: In instantiation of ‘__test_FundamentalTypeClassification()::<lambda(AK::TypeWrapper<T>)> [with T = void*]’:
.././AK/TypeList.h:65:19: required from ‘constexpr void AK::for_each_type_impl(F&&, AK::IndexSequence<Indexes ...>) [with List = AK::TypeList<short unsigned int, unsigned int, long unsigned int, long long unsigned int, void*>; F = __test_FundamentalTypeClassification()::<lambda(AK::TypeWrapper<T>)>; unsigned int ...Indexes = {0, 1, 2, 3, 4}; AK::IndexSequence<Indexes ...> = AK::Integ
@ADKaster
ADKaster / log.txt
Created December 31, 2020 09:00
background failure
21454 pts/0 S+ 0:00 \_ ctest -I 2,2 --repeat until-fail:100 --test-timeout=20000
21484 ? Ss 0:00 \_ /home/andrew/serenity/Build/Meta/Lagom/shell /home/andrew/serenity/Meta/Lagom/../../Shell/Tests/backgrounding.sh
21491 ? S 0:00 \_ /home/andrew/serenity/Build/Meta/Lagom/shell /home/andrew/serenity/Meta/Lagom/../../Shell/Tests/backgrounding.sh
21492 ? S 0:00 \_ /home/andrew/serenity/Build/Meta/Lagom/shell /home/andrew/serenity/Meta/Lagom/../../Shell/Tests/backgrounding.sh
21493 ? S 0:00 \_ /home/andrew/serenity/Build/Meta/Lagom/shell /home/andrew/serenity/Meta/Lagom/../../Shell/Tests/backgrounding.sh
21494 ? R 1:00 \_ /home/andrew/serenity/Build/Meta/Lagom/shell /home/andrew/serenity/Meta/Lagom/../../Shell/Tests/backgrounding.sh
21508 ? S 0:00 \_ cat fifo3
@ADKaster
ADKaster / Dockerfile
Created January 12, 2021 13:12
simple serenity build dockerfile
FROM ubuntu:20.04
RUN apt update && \
apt-get install software-properties-common wget -y
RUN apt-get purge -y gcc-9 g++-9 libstdc++-9-dev clang-format-10 && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main" && \
apt update && \
apt install -y gcc-10 g++-10 clang-format-11 libstdc++-10-dev libmpfr-dev libmpc-dev ninja-build npm e2fsprogs qemu-system-i386 qemu-utils cmake
@ADKaster
ADKaster / lit.log
Created July 22, 2022 21:07
check-cxx lit compile error on SerenityOS
ninja: Entering directory `llvm-build'
[0/1] cd /home/anon/llvm-build/runtimes/runtimes-bins && /usr/local/bin/cmake --build /home/anon/llvm-build/runtimes/runtimes-bins/ --target check-cxx --config Debug
[0/1] Running libcxx tests
llvm-lit: /home/anon/llvm-build/runtimes/runtimes-bins/libcxx/test/lit.site.cfg:63: note: Using configuration variant: libcxx
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add Lit feature target=x86_64-pc-serenity' as a result of parameter 'target_triple=x86_64-pc-serenity'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add --target=x86_64-pc-serenity to %{flags}' as a result of parameter 'target_triple=x86_64-pc-serenity'
llvm-lit: /home/anon/llvm-project-14.0.1.src/libcxx/utils/libcxx/test/newconfig.py:23: note: Applied 'add substitution %{triple} = x86_64-pc-serenity' as a result of parameter 'target_triple=x86_64-pc-serenity'
llvm-lit: /home/anon/llvm-project-14.0.1.sr
/home/andrew/serenity/Userland/Libraries/LibJS/Heap/GCPtr.h:187:29: runtime error: reference binding to null pointer of type 'Web::DOM::Document'
#0 0x556605e195eb in operator* /home/andrew/serenity/Userland/Libraries/LibJS/Heap/GCPtr.h:187:22
#1 0x556605e195eb in Web::HTML::Window::associated_document() /home/andrew/serenity/Userland/Libraries/LibWeb/HTML/Window.h:48:51
#2 0x7f775472ab83 in Web::HTML::queue_global_task(Web::HTML::Task::Source, JS::Object&, AK::Function<void ()>) /home/andrew/serenity/Userland/Libraries/LibWeb/HTML/EventLoop/EventLoop.cpp:250:35
#3 0x7f77540b5419 in Web::HTML::BrowsingContext::set_system_visibility_state(Web::HTML::VisibilityState) /home/andrew/serenity/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp:1296:5
#4 0x7f7751f6f0e7 in QWidget::event(QEvent*) (/lib/x86_64-linux-gnu/libQt6Widgets.so.6+0x1d90e7) (BuildId: 1b8a809c3e427a6488ddc759bd04d21b53094660)
#5 0x7f775200b405 in QFrame::event(QEvent*) (/lib/x86_64-linux-gnu/libQt6Widgets.so.6+0x275405) (
@ADKaster
ADKaster / llvm-mc-crash-emscripten.log
Created October 23, 2022 19:39
llvm-mc-crash-emscripten
[69/2164] Building CXX object _deps/lagom-build/Userland/Libraries/LibCompress/CMakeFiles/LibCompress.dir/BrotliDictionary.cpp.o
FAILED: _deps/lagom-build/Userland/Libraries/LibCompress/CMakeFiles/LibCompress.dir/BrotliDictionary.cpp.o
/usr/bin/ccache /home/andrew/emsdk/upstream/emscripten/em++ -I/home/andrew/serenity -I/home/andrew/serenity/Userland/Libraries -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug/_deps/lagom-build -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug/_deps/lagom-build/Userland/Services -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug/_deps/lagom-build/Userland/Libraries -I/home/andrew/serenity/Meta/Lagom/../.. -I/home/andrew/serenity/Meta/Lagom/../../Userland -I/home/andrew/serenity/Meta/Lagom/../../Userland/Libraries -I/home/andrew/serenity/Meta/Lagom/../../Userland/Services -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug -g -ggnu-pubnames -Wall -Wextra -Werror -Wno-implicit-const-int-float-conversion -Wno-literal-suffix -Wno-maybe-uninitialized -Wno
@ADKaster
ADKaster / llvm 16 libweb
Created October 23, 2022 19:57
llvm 16 libweb failure
FAILED: _deps/lagom-build/Userland/Libraries/LibWeb/CMakeFiles/LibWeb.dir/Bindings/ResponseConstructor.cpp.o
/usr/bin/ccache /home/andrew/emsdk/upstream/emscripten/em++ -I/home/andrew/serenity -I/home/andrew/serenity/Userland/Libraries -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug/_deps/lagom-build -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug/_deps/lagom-build/Userland/Services -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug/_deps/lagom-build/Userland/Libraries -I/home/andrew/serenity/Meta/Lagom/../.. -I/home/andrew/serenity/Meta/Lagom/../../Userland -I/home/andrew/serenity/Meta/Lagom/../../Userland/Libraries -I/home/andrew/serenity/Meta/Lagom/../../Userland/Services -I/home/andrew/build-ladybird-WebAssembly_Qt_6_4_0-Debug -g -ggnu-pubnames -Wall -Wextra -Werror -Wno-implicit-const-int-float-conversion -Wno-literal-suffix -Wno-maybe-uninitialized -Wno-unknown-warning-option -Wno-unused-command-line-argument -fsigned-char -fno-exceptions -fdiagnostics-color=always -fPIC -g1 -O