Comments (8)
I've duplicated this error on OSX using the following script:
HAI 1.3
I HAS A counter ITZ 0
I HAS A number ITZ 0
IM IN YR loop
counter R SUM OF counter AN 1
SUM OF 1 AN 2
number R SUM OF IT AN 3
VISIBLE ":{counter}:>:{number}"
IM OUTTA YR loop
KTHXBYE
This code segfaults in the first 200 iterations or so. When run on Linux, it runs perfectly fine, so this appears to be an OSX issue. I used XCode to build this, so it may also be a clang issue.
Cursory debugging indicates that the segfault occurs on various calls to free() in the statement evaluation logic.
EDIT: Looks like the error was a double free of the implicit IT
variable. I'll create a pull request to fix this.
from lci.
Huh.. this looks fun ! I'll also investigate this bug ~
from lci.
@jasonhemann After ~50,000 of runs, I'm still unable to reproduce the segfault:
ubuntu@server ~> i=0; while :; do echo "[$i] $(./lci bug.lol)" ; i=$(( i+1 )) ; done 2> bug.log
...
[50000] 6
[50001] 6
I'm just wondering how you have compiled the lci
binary. Did you use any optimization flags?
from lci.
Hi,
I am compiling future
branch, on which I'm up to date. I'm running the Makefile as usual, but I do see two warnings when I compile.
bash-3.2$ sudo make
Password:
Scanning dependencies of target lci
[ 10%] Building C object CMakeFiles/lci.dir/interpreter.c.o
[ 20%] Building C object CMakeFiles/lci.dir/lexer.c.o
[ 30%] Building C object CMakeFiles/lci.dir/main.c.o
[ 40%] Building C object CMakeFiles/lci.dir/parser.c.o
/Users/jhemann/Documents/lci/parser.c:2914:55: warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
if (!status) status = acceptToken(&tokens, TT_HASAN) || -1;
^ ~~
/Users/jhemann/Documents/lci/parser.c:2914:55: note: use '|' for a bitwise operation
if (!status) status = acceptToken(&tokens, TT_HASAN) || -1;
^~
|
1 warning generated.
[ 50%] Building C object CMakeFiles/lci.dir/tokenizer.c.o
[ 60%] Building C object CMakeFiles/lci.dir/unicode.c.o
[ 70%] Building C object CMakeFiles/lci.dir/error.c.o
[ 80%] Building C object CMakeFiles/lci.dir/binding.c.o
/Users/jhemann/Documents/lci/binding.c:12:11: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (c = input[pos]) {
~~^~~~~~~~~~~~
/Users/jhemann/Documents/lci/binding.c:12:11: note: place parentheses around the assignment to silence this warning
while (c = input[pos]) {
^
( )
/Users/jhemann/Documents/lci/binding.c:12:11: note: use '==' to turn this assignment into an equality comparison
while (c = input[pos]) {
^
==
1 warning generated.
[ 90%] Building C object CMakeFiles/lci.dir/inet.c.o
[100%] Linking C executable lci
[100%] Built target lci
from lci.
@jasonhemann Hmm.. when I compiled it on Docker ubuntu:17.10
image, I also saw the same make
log. However, I am still unable to reproduce the issue..
from lci.
What other information can I supply that would help narrow this down?
from lci.
@initbar I'm compiling on OSX 10.10.5, with what I assume is the standard OSX build environment.
from lci.
@jasonhemann Hmm, then I'm not sure if I can be helpful 😅 (I don't have any Macs)
from lci.
Related Issues (20)
- EOL doesn't replace MKAY when calling a variadic function
- Function can read and modify variables in outside scope
- Python 2 is EOL in 3 months
- BTW may not appear on the same line as TLDR
- LIEK does not perform a deep copy HOT 2
- Is lolcode dead?
- Suggestion: PIPE library to allow execution of commands in LOLCODE
- 'future' branch interpreter array errors HOT 2
- Windows Standalone Version
- Loops always create a loop-scope variable and initialize it to 0
- Does not work on replit.
- Does this allows to embed into software as a script language? HOT 1
- LOLCODE for Windows 10 HOT 1
- test fail with Python 3
- Error Installing: There was a Make error - Readline.h HOT 4
- CMake ERROR HOT 1
- Functions of NOOB very limited
- Out of Bounds Read and Null Pointer Dereference in LCI Version 0.10.5
- Link to spec? HOT 2
- How can I build the project from the future branch? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lci.