Skip to content

Commit

Permalink
fix: disable aborting when collecting from unknown threads and make p…
Browse files Browse the repository at this point in the history
…utenv noop on windows
  • Loading branch information
aboeglin committed Jun 8, 2024
1 parent 0043db6 commit 3f5dbfa
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion madlib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.0
-- see: https://github.com/sol/hpack

name: madlib
version: 0.23.16
version: 0.23.17
description: Please see the README on GitHub at <https://github.com/madlib-lang/madlib#readme>
homepage: https://github.com/madlib-lang/madlib#readme
bug-reports: https://github.com/madlib-lang/madlib/issues
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: madlib
version: 0.23.16
version: 0.23.17
github: "madlib-lang/madlib"
license: BSD3
author: "Arnaud Boeglin, Brekk Bockrath"
Expand Down
2 changes: 1 addition & 1 deletion pkg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@madlib-lang/madlib",
"version": "0.23.16",
"version": "0.23.17",
"main": "./src/run.js",
"bin": {
"madlib": "src/run.js"
Expand Down
4 changes: 3 additions & 1 deletion runtime/src/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#endif

#ifdef __MINGW32__
extern int putenv(char *);
int putenv(char *) {
return 0;
}
#endif

#ifdef __cplusplus
Expand Down
18 changes: 13 additions & 5 deletions scripts/build-runtime-libs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,21 @@ fi
# build libgc
LIBGC_VERSION="8.2.6"

wget "https://github.com/ivmai/bdwgc/archive/refs/tags/v${LIBGC_VERSION}.zip"
unzip "v${LIBGC_VERSION}.zip" -d libgc
cd "libgc/bdwgc-${LIBGC_VERSION}"
# wget "https://github.com/ivmai/bdwgc/archive/refs/tags/v${LIBGC_VERSION}.zip"
# unzip "v${LIBGC_VERSION}.zip" -d libgc
# cd "libgc/bdwgc-${LIBGC_VERSION}"

wget "https://github.com/madlib-lang/bdwgc/archive/refs/heads/disable-unknown-thread-abort.zip"
unzip disable-unknown-thread-abort.zip
cd bdwgc-disable-unknown-thread-abort

sed -i -e 's/scan_size = 2/scan_size = 8/g' alloc.c
git clone https://github.com/ivmai/libatomic_ops.git
make -f Makefile.direct CFLAGS_EXTRA="-O3 -DDONT_ADD_BYTE_AT_END -DNO_DEBUGGING -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL" c++
make -f Makefile.direct CFLAGS_EXTRA="-O3 -DDONT_ADD_BYTE_AT_END -DNO_DEBUGGING -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL"
# make -f Makefile.direct CFLAGS_EXTRA="-O3 -DDONT_ADD_BYTE_AT_END -DNO_DEBUGGING -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL" c++
# make -f Makefile.direct CFLAGS_EXTRA="-O3 -DDONT_ADD_BYTE_AT_END -DNO_DEBUGGING -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL"
make -f Makefile.direct CFLAGS_EXTRA="-O3 -DTHREAD_LOCAL_ALLOC -DGC_USE_LD_WRAP -DDONT_ADD_BYTE_AT_END -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL" c++
make -f Makefile.direct CFLAGS_EXTRA="-O3 -DTHREAD_LOCAL_ALLOC -DGC_USE_LD_WRAP -DDONT_ADD_BYTE_AT_END -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL"

# make -f Makefile.direct CFLAGS_EXTRA="-O3 -DTHREAD_LOCAL_ALLOC -DGC_DISCOVER_TASK_THREADS -DDEBUG_THREADS -DGC_ASSERTIONS -DDONT_ADD_BYTE_AT_END -DFIND_LEAK -DGC_DEBUG -DGC_DUMP_REGULARLY -DKEEP_BACK_PTRS -DALL_INTERIOR_POINTERS -DGC_PRINT_VERBOSE_STATS -DPRINT_BLACK_LIST -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL" c++
# make -f Makefile.direct CFLAGS_EXTRA="-O3 -DTHREAD_LOCAL_ALLOC -DGC_DISCOVER_TASK_THREADS -DDEBUG_THREADS -DGC_ASSERTIONS -DDONT_ADD_BYTE_AT_END -DFIND_LEAK -DGC_DEBUG -DGC_DUMP_REGULARLY -DKEEP_BACK_PTRS -DALL_INTERIOR_POINTERS -DGC_PRINT_VERBOSE_STATS -DPRINT_BLACK_LIST -DGC_THREADS -DLARGE_CONFIG -DGC_DISABLE_INCREMENTAL"
cd ../..
Expand Down

0 comments on commit 3f5dbfa

Please sign in to comment.