Print this page
6092 rtld should always provide assfail/assfail3
Reviewed by: Andy Stormont <astormont@racktopsystems.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/rtld/common/util.c
          +++ new/usr/src/cmd/sgs/rtld/common/util.c
↓ open down ↓ 3064 lines elided ↑ open up ↑
3065 3065  void
3066 3066  eprintf(Lm_list *lml, Error error, const char *format, ...)
3067 3067  {
3068 3068          va_list         args;
3069 3069  
3070 3070          va_start(args, format);
3071 3071          veprintf(lml, error, format, args);
3072 3072          va_end(args);
3073 3073  }
3074 3074  
3075      -#if     DEBUG
3076 3075  /*
3077 3076   * Provide assfail() for ASSERT() statements.  See <sys/debug.h> for further
3078 3077   * details.
3079 3078   */
3080 3079  int
3081 3080  assfail(const char *a, const char *f, int l)
3082 3081  {
3083 3082          (void) printf("assertion failed: %s, file: %s, line: %d\n", a, f, l);
3084 3083          (void) _lwp_kill(_lwp_self(), SIGABRT);
3085 3084          return (0);
3086 3085  }
3087 3086  
3088 3087  void
3089 3088  assfail3(const char *msg, uintmax_t a, const char *op, uintmax_t b,
3090 3089      const char *f, int l)
3091 3090  {
3092      -        (void) printf("assertion failed: %s (%llu %s %llu), "
3093      -            "file: %s, line: %d\n", msg, a, op, b, f, l);
     3091 +        (void) printf("assertion failed: %s (0x%llx %s 0x%llx), "
     3092 +            "file: %s, line: %d\n", msg, (unsigned long long)a, op,
     3093 +            (unsigned long long)b, f, l);
3094 3094          (void) _lwp_kill(_lwp_self(), SIGABRT);
3095 3095  }
3096      -#endif
3097 3096  
3098 3097  /*
3099 3098   * Exit.  If we arrive here with a non zero status it's because of a fatal
3100 3099   * error condition (most commonly a relocation error).  If the application has
3101 3100   * already had control, then the actual fatal error message will have been
3102 3101   * recorded in the dlerror() message buffer.  Print the message before really
3103 3102   * exiting.
3104 3103   */
3105 3104  void
3106 3105  rtldexit(Lm_list * lml, int status)
↓ open down ↓ 683 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX