From: Alexander P. <ale...@us...> - 2008-06-26 09:48:20
|
Build Version : T2.5.0.20475 Firebird 2.5 Alpha 1 (writeBuildNum.sh,v 1.20635 2008/06/26 09:47:52 alexpeshkof ) Update of /cvsroot/firebird/firebird2/src/jrd/os/posix In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv6142/jrd/os/posix Modified Files: isc_ipc.cpp unix.cpp Log Message: Fixed CORE-1964: Use of 0 instead of isc_arg_end to terminate list of ERR_post's (and cousines) arguments is invalid. Also cleaned up use of gds__log() in a few places. Index: isc_ipc.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/jrd/os/posix/isc_ipc.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -b -U3 -r1.30 -r1.31 --- isc_ipc.cpp 2 Apr 2008 14:26:09 -0000 1.30 +++ isc_ipc.cpp 26 Jun 2008 09:47:52 -0000 1.31 @@ -229,7 +229,7 @@ } sprintf(arg, "%d", pipes[0]); if (!vfork()) { - execl(process, process, arg, 0); + execl(process, process, arg, NULL); gds__log("ISC_kill: error %d starting gds_relay %s", errno, process); _exit(0); Index: unix.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/jrd/os/posix/unix.cpp,v retrieving revision 1.99 retrieving revision 1.100 diff -b -U3 -r1.99 -r1.100 --- unix.cpp 4 Jun 2008 13:38:02 -0000 1.99 +++ unix.cpp 26 Jun 2008 09:47:52 -0000 1.100 @@ -225,7 +225,7 @@ ERR_post(isc_io_error, isc_arg_string, "open O_CREAT", isc_arg_string, ERR_string(file_name), - isc_arg_gds, isc_io_create_err, isc_arg_unix, errno, 0); + isc_arg_gds, isc_io_create_err, isc_arg_unix, errno, isc_arg_end); } #ifdef HAVE_FCHMOD @@ -242,7 +242,7 @@ ERR_post(isc_io_error, isc_arg_string, "chmod", isc_arg_string, ERR_string(file_name), - isc_arg_gds, isc_io_create_err, isc_arg_unix, chmodError, 0); + isc_arg_gds, isc_io_create_err, isc_arg_unix, chmodError, isc_arg_end); } if (temporary @@ -259,7 +259,7 @@ ERR_post(isc_io_error, isc_arg_string, "unlink", isc_arg_string, ERR_string(file_name), - isc_arg_gds, isc_io_create_err, isc_arg_unix, errno, 0); + isc_arg_gds, isc_io_create_err, isc_arg_unix, errno, isc_arg_end); } #endif } @@ -380,7 +380,7 @@ isc_arg_string, "fcntl() SYNC/DIRECT", isc_arg_cstring, file->fil_length, ERR_string(file->fil_string, file->fil_length), isc_arg_gds, - isc_io_access_err, isc_arg_unix, errno, 0); + isc_io_access_err, isc_arg_unix, errno, isc_arg_end); } #else //FCNTL_BROKEN maybeCloseFile(file->fil_desc); @@ -390,7 +390,7 @@ { ERR_post(isc_io_error, isc_arg_string, "re open() for SYNC/DIRECT", isc_arg_cstring, file->fil_length, ERR_string(file->fil_string, file->fil_length), - isc_arg_gds, isc_io_open_err, isc_arg_unix, errno, 0); + isc_arg_gds, isc_io_open_err, isc_arg_unix, errno, isc_arg_end); } #endif //FCNTL_BROKEN @@ -599,7 +599,7 @@ ERR_post(isc_io_error, isc_arg_string, "open", isc_arg_cstring, file_name.length(), ERR_cstring(file_name), - isc_arg_gds, isc_io_open_err, isc_arg_unix, errno, 0); + isc_arg_gds, isc_io_open_err, isc_arg_unix, errno, isc_arg_end); } /* If this is the primary file, set Database flag to indicate that it is * being opened ReadOnly. This flag will be used later to compare with @@ -627,7 +627,7 @@ isc_arg_cstring, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_open_err, - isc_arg_unix, ENOENT, 0); + isc_arg_unix, ENOENT, isc_arg_end); } #endif /* SUPPORT_RAW_DEVICES */ @@ -968,9 +968,9 @@ isc_arg_string, "lseek", isc_arg_cstring, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_read_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); if ((reinterpret_cast<Ods::header_page*>(header_page_buffer)->hdr_flags & Ods::hdr_shutdown_mask) == Ods::hdr_shutdown_single) - ERR_post(isc_shutdown, isc_arg_cstring, file_name.length(), ERR_cstring(file_name), 0); + ERR_post(isc_shutdown, isc_arg_cstring, file_name.length(), ERR_cstring(file_name), isc_arg_end); pageSpace->file = NULL; // Will be set again later by the caller } catch (const Firebird::Exception&) { @@ -1024,7 +1024,7 @@ isc_arg_string, ERR_string(file->fil_string, file->fil_length), isc_arg_gds, - operation, isc_arg_unix, errno, 0); + operation, isc_arg_unix, errno, isc_arg_end); // Added a false for final return - which seems to be the answer, // but is better than what it was which was nothing ie random @@ -1182,7 +1182,7 @@ isc_arg_string, "raw_devices_validate_database", isc_arg_string, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_read_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); for (int i = 0; i < IO_RETRY; i++) { @@ -1191,7 +1191,7 @@ isc_arg_string, "lseek", isc_arg_string, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_read_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); const ssize_t bytes = read (desc, header, sizeof(header)); if (bytes == sizeof(header)) goto read_finished; @@ -1200,14 +1200,14 @@ isc_arg_string, "read", isc_arg_string, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_read_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); } ERR_post (isc_io_error, isc_arg_string, "read_retry", isc_arg_string, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_read_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); read_finished: /* Rewind file pointer */ @@ -1216,7 +1216,7 @@ isc_arg_string, "lseek", isc_arg_string, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_read_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); /* Validate database header. Code lifted from PAG_header. */ if (hp->hdr_header.pag_type != pag_header /*|| hp->hdr_sequence*/) @@ -1259,7 +1259,7 @@ isc_arg_string, "open", isc_arg_string, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_open_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); } memset(header, 0xa5, sizeof(header)); @@ -1275,7 +1275,7 @@ isc_arg_string, "write", isc_arg_string, file_name.length(), ERR_cstring (file_name), isc_arg_gds, isc_io_write_err, - isc_arg_unix, errno, 0); + isc_arg_unix, errno, isc_arg_end); } //if (desc != -1) perhaps it's better to check this??? |