Date: Fri, 22 Mar 2002 11:10:02 -0800 (PST) From: Paul Trunley <paul@trunley.org> To: freebsd-ports@FreeBSD.org Subject: Re: ports/29704: Imagemagick Identify utility crashes when used on smbfs mounted share Message-ID: <200203221910.g2MJA2T71234@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/29704; it has been noted by GNATS. From: Paul Trunley <paul@trunley.org> To: freebsd-gnats-submit@FreeBSD.org, ppathiakis@homeportfolio.com, bp@FreeBSD.org Cc: Subject: Re: ports/29704: Imagemagick Identify utility crashes when used on smbfs mounted share Date: Fri, 22 Mar 2002 11:05:28 -0800 --------------Boundary-00=_4D2EP8HFYFHO7KWR0LE8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit I believe that this is a problem with smbfs and not with the Identify utility. I've included a small program that demonstrates the issue. On local filesystems it is permissable to close an fd that had previously been mmap'd. The mmap'd region is still accessable. On an smbfs file this results in a segmenation fault when the region is accessed. Boris, I'm working on a patch to fix the problem. If you want some more details please feel free to contact me. --------------Boundary-00=_4D2EP8HFYFHO7KWR0LE8 Content-Type: text/x-c; charset="iso-8859-1"; name="test.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.c" LyoKICBzbWJmcyBtbWFwIGJ1ZwoqLwoKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRs aWIuaD4KI2luY2x1ZGUgPHN0ZGFyZy5oPgojaW5jbHVkZSA8ZXJyLmg+CiNpbmNsdWRlIDxmY250 bC5oPgojaW5jbHVkZSA8c3RyaW5nLmg+CiNpbmNsdWRlIDxzeXMvdHlwZXMuaD4KI2luY2x1ZGUg PHN5cy9tbWFuLmg+CgppbnQKbWFpbiAoaW50IGFyZ2MsIGNoYXIqKiBhcmd2KSB7CiAgICBpbnQg ZmQ7CiAgICBjaGFyIGJ1ZiBbNDA5Nl07CiAgICBjaGFyICpmaWxlbmFtZTsKICAgIGNoYXIgKmFk ZHI7CgogICAgaWYg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F9GQUlMVVJFLCAidW5hYmxlIHRvIG1tYXAgJXMiLCBmaWxlbmFtZSk7CiAg ICB9CgogICAgaWYgKGNsb3NlIChmZCkgPT0gLTEpIHsKCWVyciAoRVhJVF9GQUlMVVJFLCAidW5h YmxlIHRvIGNsb3NlICVzIiwgZmlsZW5hbWUpOwogICAgfQoKICAgIC8qCiAgICAgIEF0dGVtcHQg dG8gYWNjZXNzIG1tYXAnZCByZWdpb24uICBPbiBsb2NhbCBmaWxlc3lzdGVtcyB0aGlzCiAgICAg IHdvcmtzIG9rLCBidXQgb24gYSBmaWxlIGxvY2F0ZWQgb24gYW4gc21iZnMgbW91bnQgdGhpcyB3 aWxsCiAgICAgIGNhdXNlIGFuIGV4Y2VwdGlvbi4KIAogICAgICBPbiB0aGUgZmFjZSBvZiBpdCB0 aGUgYXR0ZW1wdCB0byBhY2Nlc3MgYSBtbWFwJ2QgcmVnaW9uIGFmdGVyCiAgICAgIHRoZSBhc3Nv Y2lhdGVkIGZkIGlzIGNsb3NlZCBzZWVtcyB0byBiZSBib2d1cywgYnV0IGNvZGUgaW4gY2xvc2UK ICAgICAgKHNyYy9zeXMva2Vybi9rZXJuX2Rlc2NyaXAuYykgdGhhdCB3b3VsZCBhdXRvbWF0aWNh bGx5IHVubWFwCiAgICAgIHJlZ2lvbnMgd2hlbiBhIGZpbGUgaXMgY2xvc2VkIGlzIHR1cm5lZCBv ZmYgd2l0aCBhbiAnI2lmIDAnLiAgSXQKICAgICAgc2VlbXMgdGhhdCB0aGlzIGJlaGF2aW91ciBp cyBpbnRlbmRlZC4KICAgICovCiAgICBiY29weSAoYWRkciwgYnVmLCBzaXplb2YgYnVmKTsKCiAg ICByZXR1cm4gMDsKfQo= --------------Boundary-00=_4D2EP8HFYFHO7KWR0LE8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203221910.g2MJA2T71234>