Project

General

Profile

Actions

Bug #409

closed

ls doesn't like -xstrconst

Added by Jason King over 10 years ago. Updated over 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[] = ...

Actions #1

Updated by Jason King over 10 years ago

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

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

Actions #2

Updated by Albert Lee over 10 years ago

Fixed by copying the string in 13252:660c760d3375.

Actions #3

Updated by Albert Lee over 10 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF