Ticket #118 (closed defect: fixed)
getcwd(NULL,0) fails on Solaris causing -g dwarf2 to crash
| Reported by: | bird-yasm@… | Owned by: | |
|---|---|---|---|
| Priority: | P1 | Milestone: | |
| Component: | Core | Version: | 0.6.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
getcwd(NULL, 0) is undefined behavior according to SuS. On GNU/Linux and *BSD it work like you expect, while on Solaris it will fail (because size is 0) and crash when the NULL pointer is accessed.
A quick workaround would be to pass PATH_MAX (limits.h) instead of 0 on Solaris.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
