ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Sergei Epiphanov <serpiph@nikiet.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] libxml2 bug#24379
Date: Thu, 30 Dec 2010 16:58:48 +0300
Message-ID: <201012301658.48608.serpiph@nikiet.ru> (raw)
In-Reply-To: <20101229070835.GI10164@altlinux.org>

Что же до libxml2, то меня смущает это кусок в error.c (последний if):
...
void XMLCDECL                                                                                                                                                 
__xmlRaiseError(xmlStructuredErrorFunc schannel,                                                                                                              
              xmlGenericErrorFunc channel, void *data, void *ctx,                                                                                             
              void *nod, int domain, int code, xmlErrorLevel level,                                                                                           
              const char *file, int line, const char *str1,                                                                                                   
              const char *str2, const char *str3, int int1, int col,                                                                                          
<------>      const char *msg, ...)                                                                                                                           
{                                                                                                                                                             
    xmlParserCtxtPtr ctxt = NULL;                                                                                                                             
    xmlNodePtr node = (xmlNodePtr) nod;                                                                                                                       
    char *str = NULL;                                                                                                                                         
    xmlParserInputPtr input = NULL;                                                                                                                           
    xmlErrorPtr to = &xmlLastError;                                                                                                                           
    xmlNodePtr baseptr = NULL;                                                                                                                                
                                                                                                                                                              
    if ((xmlGetWarningsDefaultValue == 0) && (level == XML_ERR_WARNING))                                                                                      
        return;                                                                                                                                               
    if ((domain == XML_FROM_PARSER) || (domain == XML_FROM_HTML) ||                                                                                           
        (domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||                                                                                         
<------>(domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {                                                                                              
<------>ctxt = (xmlParserCtxtPtr) ctx;                                                                                                                        
//Вот этот if
<------>if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&                                                                                    
<------>    (ctxt->sax->initialized == XML_SAX2_MAGIC))                                                                                                       
<------>    schannel = ctxt->sax->serror;                                                                                                                     

    }    
...

При вызове этой функции из предложенного testcase получается, то schannel 
выставляется, а data (которая при вызове равна NULL) - нет. После этого всё 
остальное и идёт лесом, так как schannel != NULL, все проверки обламываются до 
пункта

...
   if (schannel != NULL) {                                                                                                                                   
        schannel(data, to);                                                                                                                                   
<------>return;                                                                                                                                               
    }  
...

После чего вызывается callback-функция с data == NULL и получаем этот момент. 
В том странном if, похоже, нет установки:

if(data == NULL) {
  data = ctxt->user_data;
}

или чего-то подобного.

-- 
С уважением, Епифанов Сергей


  parent reply	other threads:[~2010-12-30 13:58 UTC|newest]

Thread overview: 141+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27 14:35 ` [devel] [#36314] DONE del=ruby-actionpack del=ruby-activerecord del=ruby-activesupport Dmitry V. Levin
2010-12-27 14:42   ` Alexey Gladkov
2010-12-27 19:49     ` Dmitry V. Levin
2010-11-19 22:00       ` [devel] Administrativia Dmitry V. Levin
2010-11-19 22:05         ` Anton Farygin
2010-11-19 22:17           ` Dmitry V. Levin
2010-12-28  9:58             ` [devel] Adm* | Re: [#36314] Michael Shigorin
2010-12-28 16:00               ` Dmitry V. Levin
2010-12-28 16:30                 ` Michael Shigorin
2010-12-27 20:10       ` [devel] [#36314] DONE del=ruby-actionpack del=ruby-activerecord del=ruby-activesupport Konstantin Pavlov
2010-12-27 20:24         ` Dmitry V. Levin
2010-12-28  9:06       ` Sergey Y. Afonin
2010-12-28 10:06         ` Michael Shigorin
2010-12-28 11:20           ` Vladimir Lettiev
2010-12-28 12:39             ` Alexey Morsov
2010-12-28 14:02             ` Vladimir V. Kamarzin
2010-12-28 14:18               ` Afanasov Dmitry
2010-12-28 14:24               ` Michael Shigorin
2010-12-28 15:24               ` Dmitry V. Levin
2010-12-28 15:08             ` Dmitry V. Levin
2010-12-28 14:03               ` Michael Shigorin
2010-12-28 15:42                 ` Dmitry V. Levin
2010-12-28 16:09                   ` Michael Shigorin
2010-12-28 16:18                   ` Alexey Gladkov
2010-12-28 16:32                     ` Dmitry V. Levin
2010-12-28 16:50                       ` Alexey Gladkov
2010-12-28 17:06                         ` [devel] libxml2 bug#24379 Dmitry V. Levin
2010-12-28 22:58                           ` Alexey Gladkov
2010-12-29  6:39                             ` Dmitry V. Levin
2010-12-29  6:59                               ` Alexey Gladkov
2010-12-29  7:08                                 ` Dmitry V. Levin
2010-12-29  7:25                                   ` Alexey Gladkov
2010-12-29  7:48                                     ` Dmitry V. Levin
2010-12-29 14:24                                   ` Michael Shigorin
2010-12-29 14:27                                     ` Alexey Gladkov
2010-12-30 13:58                                   ` Sergei Epiphanov [this message]
2010-12-30 14:22                                     ` Alexey Gladkov
2010-12-30 14:41                                       ` Sergei Epiphanov
2010-12-30 14:46                                         ` Alexey Gladkov
2010-12-30 15:34                                           ` Sergei Epiphanov
2010-12-30 15:36                                             ` Alexey Gladkov
2010-12-30 14:55                                     ` Sergey Y. Afonin
2010-12-28 18:00                       ` [devel] [#36314] DONE del=ruby-actionpack del=ruby-activerecord del=ruby-activesupport Michael Shigorin
2010-12-29  6:42                         ` Dmitry V. Levin
2010-12-28 15:50                   ` Michael Shigorin
2010-12-28 23:34                     ` Денис Смирнов
2010-12-29  4:35                       ` REAL
2010-12-29  5:47                         ` Chernyshov A
2010-12-29  6:07                           ` REAL
2010-12-29 14:41                       ` [devel] libxml2 bug#24379 Michael Shigorin
2010-12-29 17:24                         ` Денис Смирнов
2010-12-30  8:24                           ` Sergei Epiphanov
2010-12-30  9:37                             ` Dmitry V. Levin
2010-12-30  9:45                               ` Sergey Bolshakov
2010-12-30 16:08                                 ` [devel] team Dmitry V. Levin
2010-12-30 16:31                                   ` Michael Shigorin
2010-12-30 16:42                                   ` REAL
2011-01-02 20:52                                 ` [devel] libxml2 bug#24379 Vitaly Lipatov
2010-12-30 10:03                               ` REAL
2010-12-30  9:51                                 ` Aleksey Novodvorsky
2010-12-30 10:03                                   ` Sergey Bolshakov
2010-12-30 10:09                                     ` Andrew Clark
2010-12-30 10:22                                     ` REAL
2010-12-30 13:54                                     ` Michael Shigorin
2010-12-30 16:22                                     ` Dmitry V. Levin
2010-12-30 10:18                                   ` REAL
2010-12-30 10:23                                 ` Slava Semushin
2010-12-30 10:35                               ` Sergei Epiphanov
2010-12-30 10:55                                 ` REAL
2010-12-30 11:21                               ` Sergey Y. Afonin
2010-12-30 11:30                               ` Vladimir V. Kamarzin
2010-12-30 11:35                                 ` Alex Gorbachenko
2010-12-30 12:04                                 ` Hihin Ruslan
2010-12-30 17:05                                 ` [devel] team Dmitry V. Levin
2010-12-31  8:09                                   ` Vladimir V. Kamarzin
2010-12-31  9:11                                     ` Dmitry V. Levin
2010-12-31 10:16                                       ` Kirill A. Shutemov
2010-12-31 10:46                                         ` Sergey Bolshakov
2010-12-31 10:54                                         ` Slava Dubrovskiy
2010-12-31 11:27                                           ` Dmitry V. Levin
2010-12-31 12:00                                             ` Slava Dubrovskiy
2010-12-31 12:10                                               ` Dmitry V. Levin
2010-12-31 12:21                                                 ` Aleksey Novodvorsky
2010-12-31 21:12                                                   ` Michael Shigorin
2010-12-31 22:09                                                 ` Alexey I. Froloff
2010-12-31 23:01                                                   ` [devel] [JT] LF Michael Shigorin
2011-01-01  1:03                                                     ` Afanasov Dmitry
2011-01-01  2:10                                                     ` Mykola S. Grechukh
2010-12-31 12:16                                             ` [devel] team Sergey Y. Afonin
2010-12-31 20:51                                             ` Michael Shigorin
2010-12-31 12:03                                           ` Радик Юсупов
2010-12-31 21:10                                             ` Michael Shigorin
2010-12-31 11:13                                         ` Dmitry V. Levin
2010-12-31 11:37                                           ` Kirill A. Shutemov
2010-12-31 11:58                                             ` Dmitry V. Levin
2010-12-31 12:37                                               ` Sergey Y. Afonin
2010-12-31 21:13                                           ` [devel] с наступающим! (will be: team) Michael Shigorin
2010-12-31 21:17                                             ` Ivan A. Melnikov
2010-12-31 21:37                                             ` Paul Wolneykien
2011-01-01  1:59                                             ` Денис Смирнов
2011-01-01 11:08                                               ` Michael Shigorin
2011-01-05  4:43                                               ` Ildar Mulyukov
2011-01-23 12:13                                                 ` Денис Смирнов
2010-12-31 20:44                                         ` [devel] team Michael Shigorin
2010-12-30 13:57                               ` [devel] libxml2 bug#24379 Michael Shigorin
2010-12-30 15:41                                 ` Kirill A. Shutemov
2010-12-30 15:59                                   ` [devel] [JT] hasher-priv breakage Michael Shigorin
2010-12-30 16:11                                     ` REAL
2010-12-30 21:15                                 ` [devel] libxml2 bug#24379 Денис Смирнов
2010-12-28 17:09                   ` [devel] [#36314] DONE del=ruby-actionpack del=ruby-activerecord del=ruby-activesupport REAL
2010-12-28 17:11                     ` Dmitry V. Levin
2010-12-28 17:38                       ` REAL
2010-12-28 23:26               ` Денис Смирнов
2010-12-30 10:35               ` [devel] libxml2 bug#24379 Denis Medvedev
2010-12-30 10:45                 ` Slava Semushin
2010-12-30 10:52                   ` Anton Chernyshov
2010-12-30 10:52                   ` Afanasov Dmitry
2010-12-30 11:34                     ` Slava Semushin
2010-12-30 21:28                     ` Paul Wolneykien
2010-12-30 22:40                       ` Afanasov Dmitry
2010-12-30 23:00                         ` Afanasov Dmitry
2010-12-30 10:58                 ` REAL
2010-12-28 12:31             ` [devel] [#36314] DONE del=ruby-actionpack del=ruby-activerecord del=ruby-activesupport Mykola S. Grechukh
2010-12-28 15:08                 ` Mykola S. Grechukh
2010-12-28 15:11                   ` Dmitry V. Levin
2010-12-28 15:32                     ` Michael Shigorin
2010-12-28 15:30                       ` Dmitry V. Levin
2010-12-28 16:20                     ` Michael Shigorin
2010-12-28 23:07                       ` Igor Zubkov
2010-12-28 20:11                     ` Anton Farygin
2010-12-29  6:46                       ` Dmitry V. Levin
2010-12-28 14:58           ` Dmitry V. Levin
2010-12-28 22:36             ` Igor Zubkov
2010-12-29  6:45               ` Dmitry V. Levin
2010-12-28 22:21           ` Igor Zubkov
2010-12-27 14:54   ` Konstantin Pavlov
2010-12-27 19:51     ` Dmitry V. Levin
2010-12-27 18:22   ` Igor Zubkov
2010-12-27 19:54     ` Dmitry V. Levin
2010-12-28 10:16       ` Igor Zubkov
2010-12-28 14:04         ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201012301658.48608.serpiph@nikiet.ru \
    --to=serpiph@nikiet.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git