Project

General

Profile

Bug #409

ls doesn't like -xstrconst

Added by Jason King about 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
cmd - userland programs
Start date:
2010-11-10
Due date:
% Done:

80%

Estimated time:
Difficulty:
Tags:
Gerrit CR:

Description

When ls is compiled with -xstrconst on SS12.1, color support causes it to segfault.

This is due to all string literals being treated as const char * in that situation.
Simple solution is to change source:usr/src/cmd/ls/ls.c#L3045 from:

static char default_colorstr* =...

to
static char colorstr[] = ...

#1

Updated by Jason King about 10 years ago

  • Assignee set to Jason King
  • % Done changed from 0 to 80

Webrev is available at: http://cr.illumos.org/view/140jqsh0/

#2

Updated by Albert Lee almost 10 years ago

Fixed by copying the string in 13252:660c760d3375.

#3

Updated by Albert Lee almost 10 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF