SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 08-17-2015, 07:31 PM
MrD MrD is offline
Sage Aficionado
 
Join Date: Feb 2005
Location: Washington DC
Posts: 387
Quote:
Originally Posted by Narflex View Post
I have an idea what the problem is here if somebody wants to try it out.

In native/ax/Native2.0/NativeCore/TSCRC32.c

I think the 'unsigned long' data types should be changed to be uint32_t (proper includes will need to be added for that). What could be happening is that the unsigned long data type now has a 64 bit value on a 64 bit platform (Whereas it was 32 bits in size on a 32 bit platform). So we start off with this:

unsigned long crc = 0xffffffff;

then when it does this:

crc = (crc << 8) ^ ts_crc32_table[ (crc >> 24) ^ (*p_byte) ];

That first left shift of 8 bits won't cause any to drop off (if unsigned longs are 64 bits now)...and it'll have stuff in the higher 32 bits. That also means then when it does the 24 bit right shift the next time around in the loop (or maybe 2 more times)...that there'll be data beyond the lowest 8 bits, making the value larger than 255 which will then walk off the array that stores the CRC values (and by a very large amount, enough to make Linux unhappy).
Doh! It's been too long since I've looked at C code. I completely missed the table dereference would go off into the woods with an out of range index!
__________________
[size=1]-MrD
=============
Linux Server 7.1.9 (1)HD300 (1) HD200 (1) HD100 (2) PC Clients
Intel Xeon L? 32Gb
CetonTV cable card /FIOS
Reply With Quote
  #22  
Old 08-17-2015, 08:49 PM
coppit coppit is offline
Sage Advanced User
 
Join Date: Mar 2003
Posts: 176
Has the fix hit the repo yet? I can prep a merge request if needed.
Reply With Quote
  #23  
Old 08-17-2015, 09:30 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Just did a pull request for this.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #24  
Old 08-18-2015, 12:47 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Fix is merged now, thanks.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP!] Problem with HDHR and Scanning for Channels sdsean SageTV Beta Test Software 2 10-15-2010 11:18 AM
Linux Sage Server crashes while scanning QAM with HDHR kbyrd SageTV Beta Test Software 7 01-11-2009 09:28 AM
Linux and HDHR chip33az SageTV Linux 7 05-28-2008 06:35 PM
Linux QAM channel scanning problems with RC1 harrijay SageTV Beta Test Software 13 09-08-2007 09:40 PM


All times are GMT -6. The time now is 05:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.