Giter Site home page Giter Site logo

Comments (10)

yangshuxin avatar yangshuxin commented on July 23, 2024 1

A proposed fix patch is just sent to @agentzh, since I will going to travel this Wed morning. I wonder if @agentzh can take over this bug in case this is urgent.

from luajit2.

alonbg avatar alonbg commented on July 23, 2024

minimal reproduction code:

echo "require'ffi'.cdef[[ #pragma pack(push, 1)]]" | src/luajit -

src/luajit: stdin:1: unexpected symbol near 'pragma'
stack traceback:
	[C]: in function 'cdef'
	stdin:1: in main chunk
	[C]: at 0x00405060

compiler flag:
-msse4.2 - reproduced
-msse4.1 - not reproduced
-msse4 - reproduced

from luajit2.

agentzh avatar agentzh commented on July 23, 2024

@alonbg Have you tried out the latest v2.1 branch of the official luajit git repository? I'm pretty sure we never touched that part of luajit in our branch.

from luajit2.

alonbg avatar alonbg commented on July 23, 2024

Hi @agentzh , yes I tried the latest v2.1 with the -msse4.2 flag - doesn't reproduce.

from luajit2.

agentzh avatar agentzh commented on July 23, 2024

@alonbg Thanks for the report! I can reproduce it on my side.

@yangshuxin Will you please take a look at this? It seems that it is triggered by our lj_str_new optimizations. Thanks!

from luajit2.

yangshuxin avatar yangshuxin commented on July 23, 2024

Turn out the string hash is hard-coded in parser.

1763 static void cp_decl_multi(CPState *cp)                                          
1764 {                                                                               
...
1779       } else if (tok == CTOK_IDENT &&                                           
1780                  cp->str->hash == H_(187aab88,fcb60b42)) { /* line */           
...
1791     } 

from luajit2.

yangshuxin avatar yangshuxin commented on July 23, 2024

I'm returning back, will make a PR ASAP.

from luajit2.

agentzh avatar agentzh commented on July 23, 2024

@alonbg Will you try @yangshuxin's LuaJIT patch in #11 on your side? Thanks!

from luajit2.

alonbg avatar alonbg commented on July 23, 2024

@agentzh - yes. I'll update ..

from luajit2.

agentzh avatar agentzh commented on July 23, 2024

@alonbg I believe this is already fixed in the latest v2.1-agentzh branch. I'm closing this.

from luajit2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.