[SCIM] Re: [i18n] Possible conflict between scim and gtk2 apps

yusuke at cherubim.icw.co.jp yusuke at cherubim.icw.co.jp
Sat Oct 2 15:11:51 UTC 2004


Cc to scim list

> The reason is probably that the gcc version installed by default is not the same
> as our compiling server. If the environment you compiling gtk2 apps is not the
> same as the environment you compiling scim, you'll get the errors I said.

I investigated this issue and maybe found a problem.
James, please fix it.

-- scim_socket_transaction.cpp line 50 --
    unsigned char *m_buffer;

    SocketTransactionImpl (size_t bufsize)
        : m_buffer_size (std::max ((size_t)SCIM_TRANS_MIN_BUFSIZE, bufsize)),
          m_read_pos (SCIM_TRANS_HEADER_SIZE),
          m_write_pos (SCIM_TRANS_HEADER_SIZE),
          m_buffer (new unsigned char [std::max ((size_t)SCIM_TRANS_MIN_BUFSIZE, bufsize)]) { <<---- HERE
    }

    ~SocketTransactionImpl () {
        delete m_buffer; <<----- and HERE
--
`delete m_buffer' should be `delete []  m_buffer'


-- valgrind output --
==14357== Mismatched free() / delete / delete []
==14357==    at 0x400289C5: __builtin_delete (vg_replace_malloc.c:244)
==14357==    by 0x400289E3: operator delete(void*) (vg_replace_malloc.c:253)
==14357==    by 0x454B1442: scim::SocketTransaction::~SocketTransaction() (scim_socket_transaction.cpp:60)
==14357==    by 0x45817228: SocketIMEngineGlobal::init() (scim_socket_imengine.cpp:181)
==14357==    Address 0x451B5EB8 is 0 bytes inside a block of size 2578 alloc'd
==14357==    at 0x40028862: __builtin_vec_new (vg_replace_malloc.c:203)
==14357==    by 0x400288B9: operator new[](unsigned) (vg_replace_malloc.c:216)
==14357==    by 0x454B16B3: scim::SocketTransaction::read_from_socket(scim::Socket const&, int) (scim_socket_transaction.cpp:66)
==14357==    by 0x458171F7: SocketIMEngineGlobal::init() (scim_socket_imengine.cpp:181)
--

--
 CHAOS AND CHANCE!
  Yusuke TABATA (yusuke at cherubim.icw.co.jp)


More information about the scim mailing list