[mythtv-commits] Ticket #12535: Segmentation fault after starting livetv recording

MythTV noreply at mythtv.org
Tue Nov 10 12:32:16 UTC 2015

#12535: Segmentation fault after starting livetv recording
 Reporter:  xenic@…                              |          Owner:
                                                 |  jyavenard
     Type:  Bug Report - General                 |         Status:
                                                 |  infoneeded_new
 Priority:  major                                |      Milestone:  0.28
Component:  MythTV - Recording                   |        Version:  0.27.5
 Severity:  medium                               |     Resolution:
 Keywords:  sigsegv segmentation fault segfault  |  Ticket locked:  0
  record                                         |

Comment (by xenic@…):

 The problem (I think) is 'dec=31' which is invalid, the precision (dec
 parameter) for my_useconds_to_str() in libmysqlclient should be 1 to 6.

 From ''my_time.c''

   Print the microsecond part: ".NNN"
   @param to        OUT The string pointer to print at
   @param useconds      The microseconds value.
   @param dec           Precision, between 1 and 6.
   @return              The length of the result string.
 static inline int
 my_useconds_to_str(char *to, ulong useconds, uint dec)
   return sprintf(to, ".%0*lu", dec,
                  useconds / (ulong) log_10_int[DATETIME_MAX_DECIMALS -


 DATETIME_MAX_DECIMALS is 6 as defined in ''my_time.h'' , so if the given
 'dec' value is greater than 6, access to log_to_int[] ends up being
 negative. The dec value is picked from 'field->decimals' which is a
 MYSQL_FIELD, after that my skills in c fail me and I can't figure out
 where the decimals value is actually coming from.

 Either this is a mysql (libmysqlclient) bug or something funny is
 happening in my database to return a dec value of 31?

Ticket URL: <https://code.mythtv.org/trac/ticket/12535#comment:5>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list