summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-15 11:07:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-15 11:07:59 -0700
commitc7089d15344e963397e9c58864f476729caeb225 (patch)
tree889b5ba3f4797bc7827d15331d00fc2762bf9629 /Makefile
parentc8efb29a3575304ed22e7e240885265e0e93ea3d (diff)
downloadtxr-c7089d15344e963397e9c58864f476729caeb225.tar.gz
txr-c7089d15344e963397e9c58864f476729caeb225.tar.bz2
txr-c7089d15344e963397e9c58864f476729caeb225.zip
Protect internal symbols from uninterning.
Issue: TXR holds numerous symbol references in global variables, like list_s. These variables are not registered as root pointers with the garbage collector. This is normally okay because symbols are reachable via packages. However, if such a symbol is uninterned, that causes an integrity problem. Solution: protect those symbols from being removed from their packages. * Makefile (OBJS): Add protsym.o. * genprotsym.txr, protsym.c: New files. * lib.c (prot_sym_check): New static function. (use_sym, uintern, rehome_sym): Use prot_sym_check to implement a defense against internal symbols being booted out of their package.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b5f164ce..7bf1d3db 100644
--- a/Makefile
+++ b/Makefile
@@ -49,7 +49,7 @@ EXTRA_OBJS-y :=
OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o
OBJS += arith.o hash.o utf8.o filter.o eval.o parser.o rand.o combi.o sysif.o
-OBJS += args.o lisplib.o cadr.o struct.o jmp.o
+OBJS += args.o lisplib.o cadr.o struct.o jmp.o protsym.o
OBJS-$(debug_support) += debug.o
OBJS-$(have_syslog) += syslog.o
OBJS-$(have_glob) += glob.o