xrootd / xrootd-python

Python bindings for XRootD are now part of the main repository.
https://github.com/xrootd/xrootd
6 stars 8 forks source link

Segmentation fault in client.FileSystem.dirlist #3

Closed glestaris closed 10 years ago

glestaris commented 10 years ago

I found the following 'minor' bug with pyxoortd:

python
>>> from XRootD import client
>>> fs = client.FileSystem("root://...")
>>> print fs.dirlist("./invalid/path")
Segmentation fault (core dumped)

It happens with invalid paths or with valid remote paths that do not point to a directory. I would expect a failed XRootDStatus instead...

I am running with XRootD v3.3.4 at SLC6 with pyxrootd compiled locally with sources from Github.

I solved the issue on my program by introducing a stat call and checking if the path is valid and the entry is a directory.

Cheers, George

jlsalmon commented 10 years ago

@glestaris Thanks for reporting. This should be fixed in the master branch now. You should receive the failed XRootDStatus now instead of the segfault.

Cheers, Justin