Comments (12)
- what version of glob are you using?
- what operating system?
- what version of node?
- I'm pretty sure
*/.js
is not going to match anything. Sure you didn't mean*.js
?
from node-glob.
🤦 Sorry for the noob bug report.
- 2.0.6
- Linux Mint (Ubuntu 10.10)
- 0.4.0
- Hmm, think Github mangled my pattern.
*/.js
is meaningless, and it doesn't trigger the segfault. The pattern I tried was**/*.js
from node-glob.
Ok, cool. See if the problem goes away by upgrading node to 0.4.5 (it might).
I'm going to port glob to be just in js soon. It won't be quite as fast, but it will be way more stable and portable that way.
from node-glob.
Still have the problem on node 0.4.5. It's interesting; it really doesn't want that pattern - glob("./**/*.js")
also segfaults, while somedir/**/*.js
does not.
Porting to JavaScript: +1 :)
from node-glob.
You could maybe do path.resolve("./**/*.js")
then, in the meantime.
If you could run it in gdb, I'd love a stack trace. Otherwise closing this for now.
from node-glob.
If you want to tell a gdb noob how, and I'd love to help :)
Interestingly, the path.resolve
approach also segfaults. Maybe it just hates my directory? :)
from node-glob.
echo 'require("glob").glob("./**/*.js", function (er, paths) { console.error(er, paths) })' > g.js
gdb node
# in gdb:
set args g.js
run
The "help" command is helpful :)
from node-glob.
Heh, seems this bug report is here to make me look bad... Sorry.
Reading symbols from /home/christian/local/bin/node...done.
(gdb) set args g.js
(gdb) run
Starting program: /home/christian/local/bin/node g.js
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffd1f42700 (LWP 8183)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd1f42700 (LWP 8183)]
0x00007fffd1f4a16b in g_lstat (fn=0x0, sb=0x0, pglob=0x0) at ../deps/glob/glob.c:1156
1156 {
from node-glob.
Ah, right, so, at that point, do this:
(gdb) backtrace
I can repro this on my linux box (was missing something obvious before). Here's what I'm seeing:
#0 0x00007fffd1f9a4d1 in g_lstat (fn=0x0, sb=0x0, pglob=0x0) at ../deps/glob/glob.c:1156
#1 0x00007fffd1f998e8 in glob3 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e8e, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae9a, restpattern=0x7ffff7e1aea2,
pglobstar=0x7ffff7e1aea2, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:827
#2 0x00007fffd1f99652 in glob2 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e8e, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae9a, pglob=0xc16490,
limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:766
#3 0x00007fffd1f9983f in glob3 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e8e, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, restpattern=0x7ffff7e1ae98,
pglobstar=0x7ffff7e1ae94, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:821
#4 0x00007fffd1f99652 in glob2 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e8e, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, pglob=0xc16490,
limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:766
#5 0x00007fffd1f99d26 in glob3 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e7c, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, restpattern=0x7ffff7e1ae98,
pglobstar=0x7ffff7e1ae94, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:931
#6 0x00007fffd1f99652 in glob2 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e7c, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, pglob=0xc16490,
limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:766
#7 0x00007fffd1f99d26 in glob3 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e74, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, restpattern=0x7ffff7e1ae98,
pglobstar=0x7ffff7e1ae94, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:931
#8 0x00007fffd1f99652 in glob2 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e74, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, pglob=0xc16490,
limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:766
#9 0x00007fffd1f99d26 in glob3 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e64, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, restpattern=0x7ffff7e1ae98,
pglobstar=0x7ffff7e1ae94, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:931
#10 0x00007fffd1f99652 in glob2 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e64, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, pglob=0xc16490,
limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:766
#11 0x00007fffd1f99d26 in glob3 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e58, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, restpattern=0x7ffff7e1ae98,
pglobstar=0x7ffff7e1ae94, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:931
#12 0x00007fffd1f99652 in glob2 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e58, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, pglob=0xc16490,
limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:766
#13 0x00007fffd1f99d26 in glob3 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e44, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, restpattern=0x7ffff7e1ae98,
pglobstar=0x7ffff7e1ae94, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:931
#14 0x00007fffd1f99652 in glob2 (pathbuf=0x7ffff7e18e40, pathend=0x7ffff7e18e44, pathlim=0x7ffff7e1ae40, pattern=0x7ffff7e1ae94, pglob=0xc16490,
limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:766
#15 0x00007fffd1f991ea in glob1 (pattern=0x7ffff7e1ae90, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:670
#16 0x00007fffd1f99063 in glob0 (pattern=0x7ffff7e1cf50, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:616
#17 0x00007fffd1f98697 in globexp1 (pattern=0x7ffff7e1cf50, pglob=0xc16490, limit=0x7ffff7e1ef60) at ../deps/glob/glob.c:333
#18 0x00007fffd1f985aa in myglob (pattern=0xbe46c8 "./**/*.js", flags=33920, errfunc=0, pglob=0xc16490) at ../deps/glob/glob.c:306
#19 0x00007fffd1f97269 in EIO_Glob (req=0xc164f0) at ../src/glob.cc:86
#20 0x0000000000542890 in eio_execute (thr_arg=<value optimized out>) at ../deps/libeio/eio.c:1826
#21 etp_proc (thr_arg=<value optimized out>) at ../deps/libeio/eio.c:1635
#22 0x00007ffff683aa04 in start_thread () from /lib/libpthread.so.0
#23 0x00007ffff65a3d4d in clone () from /lib/libc.so.6
#24 0x0000000000000000 in ?? ()
from node-glob.
Yeah, solution is just to write this in JS.
from node-glob.
Cool. Thanks for being so helpful!
from node-glob.
Will be solved by #23
from node-glob.
Related Issues (20)
- Is `README.md` not updated? HOT 3
- throw '"glob"' has no exported member named 'globSync'. Did you mean 'GlobSync' in 10.3.7 HOT 5
- Module '"glob'" has no exported member 'GlobOptionsWithFileTypesUnset' in 10.3.7 HOT 4
- After upgrade from 10.3.6 to 10.3.7 the eslint import plugin reports errors when importing glob HOT 36
- v10.3.7 is broken HOT 7
- Compile error with 10.3.8 HOT 3
- Typescript: Cannot find type declarations HOT 2
- Cannot find module 'glob' or its corresponding type declarations HOT 1
- add a flag like `--ignore-path` similar to Prettier HOT 1
- New version jackspeak break commonjs libs HOT 6
- Are there return value examples for versions 7.1.6 and 10 glob.sync HOT 4
- Recent bump of `jackspeak` dep should have been a major version bump HOT 8
- Patch update 10.3.6 -> 10.3.7 appears to have multiple breaking changes HOT 3
- Redundant `//?/` HOT 4
- Clarify nocase documentation (specifically when setting it to not match OS behavior) HOT 2
- ignore option is not working with relative path HOT 1
- Using path.join no results HOT 1
- CWE-772 on dependency inflight HOT 1
- Memory leak in inflight dependency HOT 4
- Using vulnerable package inflight HOT 1
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 node-glob.