Skip to content


Subversion checkout URL

You can clone with
Download ZIP


disklayout (crash) / diskinfo (segfault) #183

jmealo opened this Issue · 2 comments

3 participants


Steps to reproduce [disklayout]:
(using -h doesn't crash; but specifying a type of layout results in the error shown below)

# disklayout

        disks = disks.filter(function (disk) {
TypeError: Cannot call method 'filter' of undefined
    at dolayout (/usr/bin/disklayout:34:16)
    at /usr/bin/disklayout:95:3
    at zpool.listDisks (/usr/node/0.8/node_modules/zfs.js:49:12)
    at ChildProcess.exithandler (child_process.js:544:7)
    at ChildProcess.EventEmitter.emit (events.js:99:17)
    at maybeClose (child_process.js:638:16)
    at Process._handle.onexit (child_process.js:680:5)

Steps to reproduce [diskinfo]:


Core dump:


Looks like stomping a constant string, ultimately from diskinfo.c:37, presumably with the toupper at line 84.
if I remember this correctly, you may also be able to stomp a constant from libdiskinfo that way, but I'm less certain of that.

@wesolows wesolows was assigned

There's also some freeing of stack garbage in some failure cases, but it appears that richlowe's diagnosis covers the case in the core. Fixed.

@wesolows wesolows closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.