Author

Topic: Antminer U3 - Linux (Ubuntu) issue (Read 6147 times)

-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
newbie
Activity: 2
Merit: 0
November 18, 2014, 01:39:33 AM
#1
Hello!

I got a Antminer U3 last week and I've been having issues trying to get it up and running on Ubuntu 14.04. It seems that the Bitmain driver for CGMiner has a buffer overflow which causes CGMiner to crash once it has detected the U3.

Per; https://github.com/bitmaintech/cgminer/blob/master/bitmain-readme.txt#L24
Steps to reproduce:

Code:
// install all the CGMiner dependences (even the optional ones)
git clone https://github.com/bitmaintech/cgminer.git
./autogen.sh // since pulling from git?
autoreconf -fvi
CFLAGS="-O2 -msse2" ./configure --enable-bmsc
make

produces a buffer overflow on line #1484 of driver-bmsc.c (https://github.com/bitmaintech/cgminer/blob/master/driver-bmsc.c#L1484):

Code:
In file included from /usr/include/string.h:640:0,
                 from ./lib/string.h:28,
                 from uthash.h:27,
                 from miner.h:25,
                 from driver-bmsc.c:45:
In function ‘memcpy’,
    inlined from ‘bmsc_scanwork’ at driver-bmsc.c:1484:2:
/usr/include/i386-linux-gnu/bits/string3.h:51:3: warning: call to __builtin___memcpy_chk will always overflow destination buffer
   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));

While I'm not a C programmer I can usually sort out issues, but I can't seem to this time. As far as I can tell this is the line that is causing the Bitmain version of CGMiner to crash. From reading the forums I know I'm not the only person with issues trying to get the U3 up and running on Ubuntu.

If it matters I'm using
Code:
gcc (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2

I know this isn't apart of the offical CGMiner code but I'm hoping someone can point me in the right direction to fixing my issue.

Thanks!
Jump to: