FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 11-22-2009, 11:47 AM
Arthur Loiret
 
Default Bug#556790: Reduced testcase from libssh2

Hi,

Here is a reduced testcase based on libssh2. I get the ICE with gcc-4.3 -O2
only.


typedef long unsigned int size_t;
typedef struct _LIBSSH2_SESSION LIBSSH2_SESSION;
typedef struct _LIBSSH2_CHANNEL LIBSSH2_CHANNEL;
typedef struct _LIBSSH2_SFTP LIBSSH2_SFTP;
typedef struct _LIBSSH2_SFTP_ATTRIBUTES LIBSSH2_SFTP_ATTRIBUTES;
struct _LIBSSH2_SFTP_ATTRIBUTES { unsigned long flags; };
struct _LIBSSH2_CHANNEL { LIBSSH2_SESSION *session; };
struct _LIBSSH2_SFTP { LIBSSH2_CHANNEL *channel; unsigned char *stat_packet; };
struct _LIBSSH2_SESSION { void *abstract; void *(*alloc)(size_t count, void **abstract); };
static int sftp_attrsize(const LIBSSH2_SFTP_ATTRIBUTES * attrs) { int attrsize = 4; if (!attrs) { return attrsize; } if (attrs->flags & 0x00000001) if (attrs->flags & 0x00000002) attrsize += 8; if (attrs->flags & 0x00000004) attrsize += 4; if (attrs->flags & 0x00000008) attrsize += 8; return attrsize; }
static int sftp_stat(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, int stat_type, LIBSSH2_SFTP_ATTRIBUTES * attrs) { LIBSSH2_CHANNEL *channel = sftp->channel; LIBSSH2_SESSION *session = channel->session; sftp->stat_packet = session->alloc((sftp_attrsize(attrs)), &(session)->abstract); }
libssh2_sftp_stat_ex(LIBSSH2_SFTP *sftp, const char *path, unsigned int path_len, int stat_type, LIBSSH2_SFTP_ATTRIBUTES *attrs) { int rc; BLOCK_ADJUST(rc, sftp->channel->session, sftp_stat(sftp, path, path_len, stat_type, attrs)); }




--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 05:51 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org