summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
de963f4)
PR lto/47241
* lto.c (lto_read_section_data): Free
fd_name in failure case.
For mingw targets don't hash file-descriptor.
(read_cgraph_and_symbols): Close current_lto_file
in failure case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169999
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-02-10 Kai Tietz <kai.tietz@onevision.com>
+
+ PR lto/47241
+ * lto.c (lto_read_section_data): Free
+ fd_name in failure case.
+ For mingw targets don't hash file-descriptor.
+ (read_cgraph_and_symbols): Close current_lto_file
+ in failure case.
+
2011-01-11 Jan Hubicka <jh@suse.cz>
PR lto/45721
2011-01-11 Jan Hubicka <jh@suse.cz>
PR lto/45721
- fd_name = xstrdup (file_data->file_name);
fd = open (file_data->file_name, O_RDONLY|O_BINARY);
if (fd == -1)
return NULL;
fd = open (file_data->file_name, O_RDONLY|O_BINARY);
if (fd == -1)
return NULL;
+ fd_name = xstrdup (file_data->file_name);
|| read (fd, result, len) != (ssize_t) len)
{
free (result);
|| read (fd, result, len) != (ssize_t) len)
{
free (result);
+#ifdef __MINGW32__
+ /* Native windows doesn't supports delayed unlink on opened file. So
+ we close file here again. This produces higher I/O load, but at least
+ it prevents to have dangling file handles preventing unlink. */
+ free (fd_name);
+ fd_name = NULL;
+ close (fd);
+ fd = -1;
+#endif
file_data = lto_file_read (current_lto_file, resolution, &count);
if (!file_data)
file_data = lto_file_read (current_lto_file, resolution, &count);
if (!file_data)
+ {
+ lto_obj_file_close (current_lto_file);
+ current_lto_file = NULL;
+ break;
+ }
decl_data[last_file_ix++] = file_data;
decl_data[last_file_ix++] = file_data;